Package com.storedobject.core
Interface NewObject<T>
- Type Parameters:
T
- Object type.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface to generate new object of a specific type.
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new instance of the object.default T
Create a new instance of the object.static void
setLocalTime
(TransactionManager tm, StoredObject object) Set local time values corresponding to theTransactionManager
to the object passed if it's just created now.static void
setSystemEntity
(TransactionManager tm, StoredObject object) SetSystemEntity
from theTransactionManager
to the object passed if it's of typeOfEntity
and its system entity is not yet set.
-
Method Details
-
newObject
-
newObject
Create a new instance of the object.- Parameters:
tm
- Transaction manager.- Returns:
- New object created.
- Throws:
Exception
- If an exception occurs while creating a new instance.
-
setLocalTime
Set local time values corresponding to theTransactionManager
to the object passed if it's just created now.- Parameters:
tm
- Transaction manager.object
- Object to which local time values to be set.
-
setSystemEntity
SetSystemEntity
from theTransactionManager
to the object passed if it's of typeOfEntity
and its system entity is not yet set.- Parameters:
tm
- Transaction manager.object
- Object to whichSystemEntity
to be set.
-