Package org.fastnate.generator.test.ids
Class FixedIdTestEntity
java.lang.Object
org.fastnate.generator.test.ids.IdTestEntity<FixedIdTestEntity>
org.fastnate.generator.test.ids.FixedIdTestEntity
An entity that uses a number as explicit primary key.
- Author:
- Tobias Liefke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()The ID of this entity.getOther()The other entity of the same type.voidsetOther(FixedIdTestEntity other) Sets the other entity.Methods inherited from class org.fastnate.generator.test.ids.IdTestEntity
getName, setName, toString
-
Constructor Details
-
FixedIdTestEntity
Creates a new instance ofFixedIdTestEntity.- Parameters:
id- the id of the entity
-
FixedIdTestEntity
public FixedIdTestEntity()
-
-
Method Details
-
getId
Description copied from class:IdTestEntityThe ID of this entity.- Specified by:
getIdin classIdTestEntity<FixedIdTestEntity>- 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<FixedIdTestEntity>- Returns:
- another entity, for testing references with the id
-
setOther
Description copied from class:IdTestEntitySets the other entity.- Specified by:
setOtherin classIdTestEntity<FixedIdTestEntity>- Parameters:
other- another entity of the same type, for testing references with the id
-