public class SimplePrimaryKey extends AbstractNamer implements PrimaryKey
Constructor and Description |
---|
SimplePrimaryKey(Entity entity,
Attribute attribute) |
Modifier and Type | Method and Description |
---|---|
Attribute |
getAttribute()
Return the only attribute when isSimple returns true.
|
List<Attribute> |
getAttributes()
Return the attributes that form this PrimaryKey.
|
Entity |
getEntity()
The entity owning this PrimaryKey.
|
String |
getFullType()
The full Java type, with package information.
|
String |
getPackageName()
The full package name.
|
String |
getToStringMethod()
Return ".toString()" if this pk is not a string.
|
String |
getType()
The java Type name, without any package information.
|
String |
getVar()
The var for the current type.
|
boolean |
isAllNullable() |
boolean |
isComposite()
Returns true if the number of attributes is greater than 1.
|
boolean |
isDate()
Returns true if the only pk attribute is a date.
|
boolean |
isEnum()
Returns true if the only pk attribute is an Enum.
|
boolean |
isImported()
Is there a XtoOne relation pointing to this PK
|
boolean |
isJavaBaseClass()
Returns true if the type is not a simple java type
|
boolean |
isNoPk() |
boolean |
isSimple()
Returns true if the number of attributes is exactly 1.
|
String |
toString() |
getAdder, getAdders, getContains, getEditer, getGetter, getGetterLocalized, getGetters, getHas, getHasPlural, getHibernateFilterName, getPackageNode, getPackageNodeUp, getPath, getRandomGetter, getRemover, getRemovers, getSetter, getSetters, getTestType, getTypeLow, getUniqueDeleter, getUniqueGetter, getVarLocalized, getVars, getVarsUp, getVarUp, getWith
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAdder, getAdders, getContains, getEditer, getGetter, getGetters, getHibernateFilterName, getPath, getRemover, getRemovers, getSetter, getSetters, getTypeLow, getVars, getVarsUp, getVarUp, getWith
public boolean isAllNullable()
public final boolean isNoPk()
isNoPk
in interface PrimaryKey
public final boolean isSimple()
PrimaryKey
isSimple
in interface PrimaryKey
public final boolean isComposite()
PrimaryKey
isComposite
in interface PrimaryKey
public final boolean isJavaBaseClass()
PrimaryKey
isJavaBaseClass
in interface PrimaryKey
public final boolean isDate()
PrimaryKey
isDate
in interface PrimaryKey
public final boolean isEnum()
PrimaryKey
isEnum
in interface PrimaryKey
public final boolean isImported()
isImported
in interface PrimaryKey
public String getVar()
Namer
getVar
in interface Namer
getVar
in class AbstractNamer
public String getType()
Namer
getType
in interface Namer
getType
in class AbstractNamer
public String getFullType()
Namer
getFullType
in interface Namer
getFullType
in class AbstractNamer
public String getPackageName()
Namer
getPackageName
in interface Namer
getPackageName
in class AbstractNamer
public String getToStringMethod()
PrimaryKey
getToStringMethod
in interface PrimaryKey
public Entity getEntity()
PrimaryKey
getEntity
in interface PrimaryKey
public Attribute getAttribute()
PrimaryKey
getAttribute
in interface PrimaryKey
public List<Attribute> getAttributes()
PrimaryKey
getAttributes
in interface PrimaryKey
Copyright © 2005-2013 JAXIO S.A.R.L. - All Rights Reserved.