Package org.fastnate.generator.test.ids
Class IdentityTestEntity
java.lang.Object
org.fastnate.generator.test.ids.IdTestEntity<IdentityTestEntity>
org.fastnate.generator.test.ids.IdentityTestEntity
An entity that uses an identity column for generating its primary key.
- Author:
- Tobias Liefke
-
Constructor Summary
ConstructorsConstructorDescriptionIdentityTestEntity(String name) Creates a new instance ofIdentityTestEntity. -
Method Summary
Modifier and TypeMethodDescriptiongetId()The ID of this entity.getOther()The other entity of the same type.voidsetOther(IdentityTestEntity other) Sets the other entity.Methods inherited from class org.fastnate.generator.test.ids.IdTestEntity
getName, setName, toString
-
Constructor Details
-
IdentityTestEntity
Creates a new instance ofIdentityTestEntity.- Parameters:
name- the name of the entity
-
IdentityTestEntity
public IdentityTestEntity()
-
-
Method Details
-
getId
Description copied from class:IdTestEntityThe ID of this entity.- Specified by:
getIdin classIdTestEntity<IdentityTestEntity>- Returns:
- the ID - the type depends on the kind of generation
-
getOther
Description copied from class:IdTestEntityThe other entity of the same type.- Specified by:
getOtherin classIdTestEntity<IdentityTestEntity>- Returns:
- another entity, for testing references with the id
-
setOther
Description copied from class:IdTestEntitySets the other entity.- Specified by:
setOtherin classIdTestEntity<IdentityTestEntity>- Parameters:
other- another entity of the same type, for testing references with the id
-