net.sf.hibernate.tool.hbm2java
Class Field

java.lang.Object
  |
  +--net.sf.hibernate.tool.hbm2java.Field

public class Field
extends Object


Constructor Summary
Field(String name, ClassName type, boolean nullable, boolean id, boolean generated, org.apache.commons.collections.MultiMap metaattribs)
           
Field(String name, ClassName type, boolean nullable, org.apache.commons.collections.MultiMap metaattribs)
           
Field(String name, ClassName type, String initialisation, boolean nullable, ClassName foreignClass, Set foreignKeys, org.apache.commons.collections.MultiMap metaattribs)
           
 
Method Summary
 String getAsSuffix()
           
 ClassName getClassType()
          Returns the classType.
 ClassName getForeignClass()
          Returns the foreignClass.
 Set getForeignKeys()
          Returns the foreignKeys.
 String getGetterSignature()
          Method getGetterSignature.
 String getGetterType()
           
 String getInitialisation()
           
 boolean getMetaAsBool(String attribute)
           
 boolean getMetaAsBool(String attribute, boolean defaultValue)
           
 String getMetaAsString(String attribute)
          Method getMetaAsString.
 String getName()
           
 String getType()
           
protected  void initWith(String name, ClassName type, String initialisation, boolean nullable, boolean id, boolean generated, ClassName foreignClass, Set foreignKeys, org.apache.commons.collections.MultiMap metaattribs)
           
 boolean isGenerated()
           
 boolean isGeneratedAsProperty()
           
 boolean isIdentifier()
           
 boolean isNullable()
           
 void setForeignClass(ClassName foreignClass)
          Sets the foreignClass.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field(String name,
             ClassName type,
             boolean nullable,
             org.apache.commons.collections.MultiMap metaattribs)

Field

public Field(String name,
             ClassName type,
             boolean nullable,
             boolean id,
             boolean generated,
             org.apache.commons.collections.MultiMap metaattribs)

Field

public Field(String name,
             ClassName type,
             String initialisation,
             boolean nullable,
             ClassName foreignClass,
             Set foreignKeys,
             org.apache.commons.collections.MultiMap metaattribs)
Method Detail

initWith

protected void initWith(String name,
                        ClassName type,
                        String initialisation,
                        boolean nullable,
                        boolean id,
                        boolean generated,
                        ClassName foreignClass,
                        Set foreignKeys,
                        org.apache.commons.collections.MultiMap metaattribs)

getInitialisation

public String getInitialisation()

getName

public String getName()

getAsSuffix

public String getAsSuffix()

getGetterType

public String getGetterType()

getType

public String getType()

isIdentifier

public boolean isIdentifier()

isNullable

public boolean isNullable()

isGenerated

public boolean isGenerated()

toString

public String toString()
Overrides:
toString in class Object

getClassType

public ClassName getClassType()
Returns the classType. Can be null as it is not always possible to get all info for a field class.

Returns:
ClassName

getMetaAsString

public String getMetaAsString(String attribute)
Method getMetaAsString.

Returns:
String

getMetaAsBool

public boolean getMetaAsBool(String attribute)

getMetaAsBool

public boolean getMetaAsBool(String attribute,
                             boolean defaultValue)

getForeignClass

public ClassName getForeignClass()
Returns the foreignClass.

Returns:
ClassName

setForeignClass

public void setForeignClass(ClassName foreignClass)
Sets the foreignClass.

Parameters:
foreignClass - The foreignClass to set

getForeignKeys

public Set getForeignKeys()
Returns the foreignKeys.

Returns:
Set

getGetterSignature

public String getGetterSignature()
Method getGetterSignature.

Returns:
String

isGeneratedAsProperty

public boolean isGeneratedAsProperty()