public class CompositePrimaryKey extends ClassNamer implements PrimaryKey
Constructor and Description |
---|
CompositePrimaryKey(Entity entity,
List<Attribute> attributes) |
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 |
getToStringMethod()
Return ".toString()" if this pk is not a string.
|
String |
getVar()
The var for the current type.
|
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()
Returns true if one of its attribute is an imported key
|
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() |
getClassType, getPackageName, getSubPackageName, getSubPackagePath, getType
getAdder, getAdders, getContains, getEditer, getFullType, 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, getFullType, getGetter, getGetters, getHibernateFilterName, getPackageName, getPath, getRemover, getRemovers, getSetter, getSetters, getType, getTypeLow, getVars, getVarsUp, getVarUp, getWith
public final String getVar()
Namer
getVar
in interface Namer
getVar
in class AbstractNamer
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 isImported()
PrimaryKey
isImported
in interface PrimaryKey
public final boolean isDate()
PrimaryKey
isDate
in interface PrimaryKey
public final boolean isEnum()
PrimaryKey
isEnum
in interface PrimaryKey
public Attribute getAttribute()
PrimaryKey
getAttribute
in interface PrimaryKey
public String getToStringMethod()
PrimaryKey
getToStringMethod
in interface PrimaryKey
public Entity getEntity()
PrimaryKey
getEntity
in interface PrimaryKey
public List<Attribute> getAttributes()
PrimaryKey
getAttributes
in interface PrimaryKey
Copyright © 2005-2013 JAXIO S.A.R.L. - All Rights Reserved.