Last update: 2011-06-23

org.proteios.core
Class ExtendedProperty

java.lang.Object
  extended by org.proteios.core.ExtendedProperty

public class ExtendedProperty
extends Object

Holds information about an extended property for a class.

Version:
2.0
Author:
Nicklas, Samuel
See Also:
ExtendableData

Method Summary
 String getColumn()
          Get the database column of the extended property.
 String getDescription()
          Get a description of the extended property.
 int getLength()
          Get the maximum allowed length of the property value.
 String getName()
          Get the name of the extended property.
 String getTitle()
          Get the title of the extended property.
 Type getType()
          Get the type of the extended property.
 boolean isInsertable()
          Check if the value of this property should be inserted into the datbase when creating new items.
 boolean isNullable()
          Check if the property allows null values or not.
 boolean isUpdateable()
          Check if the value of this property should be updated in the database when an item is updated.
 Object parseString(String value)
           
 void validateValue(Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Get the name of the extended property. This is the name that is used in queries and for the name parameter of the getExtended/setExtended methods to get or set the value of the property of an Extendable item.

Returns:
A string with the name
See Also:
ExtendableData.getExtended, ExtendableData.setExtended

getTitle

public String getTitle()
Get the title of the extended property. The title is not used by the core but can be used by client applications for example to display a column header.

Returns:
A string with the title

getDescription

public String getDescription()
Get a description of the extended property. The description is not used by the core but can be used by client applications.

Returns:
A string with the description

getColumn

public String getColumn()
Get the database column of the extended property. This is the name of the column in the database which holds the value.


getType

public Type getType()
Get the type of the extended property. The value returned is one of the defined constants by the Type enumeration.


getLength

public int getLength()
Get the maximum allowed length of the property value. This is only useful if it a string property.

Returns:
The maximum allowed length

isNullable

public boolean isNullable()
Check if the property allows null values or not.

Returns:
TRUE if null values are allowed, FALSE otherwise

isInsertable

public boolean isInsertable()
Check if the value of this property should be inserted into the datbase when creating new items.

Returns:
TRUE if the value should be inserted, FALSE otherwise

isUpdateable

public boolean isUpdateable()
Check if the value of this property should be updated in the database when an item is updated.

Returns:
TRUE if the value should be updated, FALSE otherwise

parseString

public Object parseString(String value)
                   throws InvalidDataException
Throws:
InvalidDataException

validateValue

public void validateValue(Object value)
                   throws InvalidDataException
Throws:
InvalidDataException

Last update: 2011-06-23