Interface NameEntityService<T extends io.github.astrapi69.data.nameable.Nameable>
-
public interface NameEntityService<T extends io.github.astrapi69.data.nameable.Nameable>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<T>findEntities(java.lang.String nameValue)Find the entities objects from the given name value.default TfindFirst(java.lang.String nameValue)Find the entity object from the given name value.default TgetOrCreateNewNameEntity(java.lang.String value)Gets the or creates a new entity objectTmerge(T object)Merges the given object.TnewNameEntity(java.lang.String value)Factory method for create a new name entity.
-
-
-
Method Detail
-
findEntities
java.util.List<T> findEntities(java.lang.String nameValue)
Find the entities objects from the given name value.- Parameters:
nameValue- the name value- Returns:
- the list with the entities
-
findFirst
default T findFirst(java.lang.String nameValue)
Find the entity object from the given name value.- Parameters:
nameValue- the name value- Returns:
- the found entity object or null if not.
-
getOrCreateNewNameEntity
@Transactional default T getOrCreateNewNameEntity(java.lang.String value)
Gets the or creates a new entity object- Parameters:
value- the value- Returns:
- the entity object
-
merge
T merge(T object)
Merges the given object. @see Hibernate documentation.- Parameters:
object- the object- Returns:
- the object
-
newNameEntity
T newNameEntity(java.lang.String value)
Factory method for create a new name entity.- Parameters:
value- the value- Returns:
- the new name entity
-
-