public class NoPrimaryKey extends Object implements PrimaryKey
Constructor and Description |
---|
NoPrimaryKey(Entity entity) |
Modifier and Type | Method and Description |
---|---|
String |
getAdder()
Name of the adder method to use to add element in the var returned by
Namer.getVars() . |
String |
getAdders()
Name of the adder method to use to add multiple elements in the var returned by
Namer.getVars() . |
Attribute |
getAttribute()
Return the only attribute when isSimple returns true.
|
List<Attribute> |
getAttributes()
Return the attributes that form this PrimaryKey.
|
String |
getContains()
Name of the 'contains' method to use to check whether the collection var returned by
Namer.getVars()
contains an element. |
String |
getEditer()
Name to the editer method to use when editing the var returned by
Namer.getVar() . |
Entity |
getEntity()
The entity owning this PrimaryKey.
|
String |
getFullType()
The full Java type, with package information.
|
String |
getGetter()
Name of the getter method to use when getting the var returned by
Namer.getVar() . |
String |
getGetters()
Name of the getter method to use when getting the var returned by
Namer.getVars() . |
String |
getHibernateFilterName() |
String |
getPackageName()
The full package name.
|
String |
getPath()
The path corresponding to the package name.
|
String |
getRemover()
Name of the remover method to use when removing an element from the collection var returned by
Namer.getVars() . |
String |
getRemovers()
Name of the remover method to use when removing multiple elements from the collection var returned by
Namer.getVars() . |
String |
getSetter()
Name to the setter method to use when setting the var returned by
Namer.getVar() . |
String |
getSetters()
Name to the setter method to use when setting the var returned by
Namer.getVars() . |
String |
getToStringMethod()
Return ".toString()" if this pk is not a string.
|
String |
getType()
The java Type name, without any package information.
|
String |
getTypeLow()
The java Type name in lower case, without any package information.
|
String |
getVar()
The var for the current type.
|
String |
getVars()
The var for a current type collection.
|
String |
getVarsUp()
Same as
Namer.getVars() but starts with an upper case. |
String |
getVarUp()
Same as
Namer.getVar() but starts with an upper case. |
String |
getWith()
Fluent method name.
|
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.
|
public NoPrimaryKey(Entity entity)
public boolean isNoPk()
isNoPk
in interface PrimaryKey
public boolean isSimple()
PrimaryKey
isSimple
in interface PrimaryKey
public boolean isComposite()
PrimaryKey
isComposite
in interface PrimaryKey
public final boolean isJavaBaseClass()
PrimaryKey
isJavaBaseClass
in interface PrimaryKey
public boolean isImported()
PrimaryKey
isImported
in interface PrimaryKey
public Attribute getAttribute()
PrimaryKey
getAttribute
in interface PrimaryKey
public final boolean isDate()
PrimaryKey
isDate
in interface PrimaryKey
public final boolean isEnum()
PrimaryKey
isEnum
in interface PrimaryKey
public String getVar()
Namer
public String getType()
Namer
public String getTypeLow()
Namer
getTypeLow
in interface Namer
public String getPath()
Namer
"com/company/project/domain"
if the package name is com.company.project.domain
.public String getPackageName()
Namer
getPackageName
in interface Namer
public String getFullType()
Namer
getFullType
in interface Namer
public String getVarUp()
Namer
Namer.getVar()
but starts with an upper case. Ex: ParentBankAccount.
Used to construct derived method.public String getVars()
Namer
public String getVarsUp()
Namer
Namer.getVars()
but starts with an upper case. Ex: ParentBankAccounts.public String getAdder()
Namer
Namer.getVars()
.
Ex: addParentBankAccountpublic String getAdders()
Namer
Namer.getVars()
.
Ex: addParentBankAccountspublic String getContains()
Namer
Namer.getVars()
contains an element. Ex: containsParentBankAccountgetContains
in interface Namer
public String getGetter()
Namer
Namer.getVar()
.
Ex: getParentBankAccountpublic String getGetters()
Namer
Namer.getVars()
.
Ex: getParentBankAccountsgetGetters
in interface Namer
public String getWith()
Namer
public String getRemover()
Namer
Namer.getVars()
.
Ex: removeParentBankAccountgetRemover
in interface Namer
public String getRemovers()
Namer
Namer.getVars()
.
Ex: removeParentBankAccountsgetRemovers
in interface Namer
public String getSetter()
Namer
Namer.getVar()
.
Ex: setParentBankAccountpublic String getSetters()
Namer
Namer.getVars()
.
Ex: setParentBankAccountsgetSetters
in interface Namer
public String getEditer()
Namer
Namer.getVar()
.
Ex: editParentBankAccountpublic String getHibernateFilterName()
getHibernateFilterName
in interface Namer
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.