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

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

public class MetaPermanentProperty
extends MetaProperty

Meta property describing permanent properties.

Author:
AGH CAST Team
See Also:
Serialized Form

Constructor Summary
MetaPermanentProperty(String name, PropertyType type, boolean matchable, Method getter, Method setter)
          Creates new permanent meta property (writable by default if setter exists).
MetaPermanentProperty(String name, String displayName, PropertyType type, boolean matchable, Method getter, Method setter)
          Creates new permanent meta property (writable by default if setter exists).
MetaPermanentProperty(String name, String displayName, PropertyType type, boolean matchable, Method getter, Method setter, boolean writable)
          Creates new permanent meta property with the given writable flag.
 
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.
 Method getSetter()
          Returns setter method for modifying property value in 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

MetaPermanentProperty

public MetaPermanentProperty(String name,
                             PropertyType type,
                             boolean matchable,
                             Method getter,
                             Method setter)
Creates new permanent meta property (writable by default if setter exists).

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

MetaPermanentProperty

public MetaPermanentProperty(String name,
                             String displayName,
                             PropertyType type,
                             boolean matchable,
                             Method getter,
                             Method setter)
Creates new permanent meta property (writable by default if setter exists).

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
setter - value setter method

MetaPermanentProperty

public MetaPermanentProperty(String name,
                             String displayName,
                             PropertyType type,
                             boolean matchable,
                             Method getter,
                             Method setter,
                             boolean writable)
Creates new permanent meta property with the given writable flag.

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
setter - value setter method
writable - flat which indicates if the property is writable
Method Detail

getGetter

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

Returns:
getter method

getSetter

public Method getSetter()
Returns setter method for modifying property value in data element.

Returns:
setter method

setWritable

public void setWritable(boolean writable)
Sets the writable flag. Allows to set true only if setter is defined.

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.