org.exolab.castor.builder.info.nature.relation
Class JDOOneToManyNature

java.lang.Object
  extended by org.castor.core.nature.BaseNature
      extended by org.exolab.castor.builder.info.nature.relation.JDOOneToManyNature
All Implemented Interfaces:
Nature

public class JDOOneToManyNature
extends BaseNature

A JDOOneToManyNature defines typed properties needed in the context a one-to-many relation between two FieldInfos.

Since:
1.2.1
Author:
Lukas Lang, Filip Hianik

Constructor Summary
JDOOneToManyNature(FieldInfo field)
          Constructor taking a FieldInfo.
 
Method Summary
 void addForeignKey(java.lang.String column)
          Adds a column to the foreign key.
 java.util.List<java.lang.String> getForeignKeys()
          Returns a List of s holding the columns of the foreign key.
 java.lang.String getId()
          Returns the Nature Id.
 boolean isDirty()
          Returns true if field will NOT be checked against the database for modification, otherwise false.
 boolean isReadOnly()
          Returns true if no update on the column can be performed, false otherwise.
 void setDirty(boolean dirty)
          If set true, field will NOT be checked against the database for modification, otherwise set false.
 void setReadOnly(boolean readOnly)
          Sets the column read only.
 
Methods inherited from class org.castor.core.nature.BaseNature
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOOneToManyNature

public JDOOneToManyNature(FieldInfo field)
Constructor taking a FieldInfo.

Parameters:
field - The field.
Method Detail

getId

public java.lang.String getId()
Returns the Nature Id.

Returns:
The fully qualified Class name.
See Also:
Nature.getId()

isReadOnly

public boolean isReadOnly()
Returns true if no update on the column can be performed, false otherwise. Default value is false.

Returns:
true if readonly, false if not or not set.

setReadOnly

public void setReadOnly(boolean readOnly)
Sets the column read only.

Parameters:
readOnly - true if read only.

isDirty

public boolean isDirty()
Returns true if field will NOT be checked against the database for modification, otherwise false. Default value is false.

Returns:
true if field is not updated, false if not or not set.

setDirty

public void setDirty(boolean dirty)
If set true, field will NOT be checked against the database for modification, otherwise set false.

Parameters:
dirty - true if field should not be updated.

getForeignKeys

public java.util.List<java.lang.String> getForeignKeys()
Returns a List of s holding the columns of the foreign key. Keep in mind that by contract of addPrimaryKey(String foreignKey) the order is not guaranteed.

Returns:
the names of the foreign key's columns or null if no keys added before.

addForeignKey

public void addForeignKey(java.lang.String column)
Adds a column to the foreign key. By contract, the order of the key columns is not guaranteed and depends on the returned List implementation the BaseNature is using.

Parameters:
column - The column name.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com