pl.edu.agh.cast.data.model.property
Class MetaTransientProperty

java.lang.Object
  extended by pl.edu.agh.cast.data.model.property.MetaProperty
      extended by pl.edu.agh.cast.data.model.property.MetaTransientProperty
All Implemented Interfaces:
Serializable

public class MetaTransientProperty
extends MetaProperty

Meta property describing transient properties. Transient properties cannot be modified and are not persisted. They may be calculated based on other properties.

Author:
AGH CAST Team
See Also:
Serialized Form

Constructor Summary
MetaTransientProperty(String name, PropertyType type, boolean matchable, Method getter)
          Creates new permanent meta property (non-writable by default).
MetaTransientProperty(String name, String displayName, PropertyType type, boolean matchable, Method getter)
          Creates new permanent meta property (non-writable by default).
 
Method Summary
 boolean equals(Object obj)
          Returns true if given object is of type MetaProperty and has equal name, type, writable and matchable flags.
 Method getGetter()
          Returns getter method for retrieving property value from data element.
 int hashCode()
          
 void setWritable(boolean writable)
          Sets the writable flag.
 String toString()
          
 
Methods inherited from class pl.edu.agh.cast.data.model.property.MetaProperty
getDisplayName, getName, getType, isMatchable, isWritable, setDisplayName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaTransientProperty

public MetaTransientProperty(String name,
                             PropertyType type,
                             boolean matchable,
                             Method getter)
Creates new permanent meta property (non-writable by default).

Parameters:
name - the name of the property
type - the type of property value
matchable - the matchable flag
getter - value getter method

MetaTransientProperty

public MetaTransientProperty(String name,
                             String displayName,
                             PropertyType type,
                             boolean matchable,
                             Method getter)
Creates new permanent meta property (non-writable by default).

Parameters:
name - the name of the property
displayName - the display name of the property
type - the type of property value
matchable - the matchable flag
getter - value getter method
Method Detail

getGetter

public Method getGetter()
Returns getter method for retrieving property value from data element.

Returns:
getter method

setWritable

public void setWritable(boolean writable)
Sets the writable flag. This method does not change the writable flag, since transient properties cannot be modified.

Overrides:
setWritable in class MetaProperty
Parameters:
writable - the writable flag to set
See Also:
MetaProperty.setWritable(boolean)

equals

public boolean equals(Object obj)
Returns true if given object is of type MetaProperty and has equal name, type, writable and matchable flags.

Overrides:
equals in class MetaProperty
See Also:
MetaProperty.equals(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class MetaProperty
See Also:
MetaProperty.hashCode()

toString

public String toString()

Overrides:
toString in class MetaProperty
See Also:
Object.toString()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.