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