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