Package com.blazebit.persistence.spi
Interface AttributeAccessor<X,Y>
-
- Type Parameters:
X
- The entity typeY
- The attribute type
public interface AttributeAccessor<X,Y>
A class to access the attribute of an entity.- Since:
- 1.4.1
- Author:
- Christian Beikov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Y
get(X entity)
Returns the attribute value of the given entity.Y
getNullSafe(X entity)
Returns the attribute value of the given entity or null if the entity is null.void
set(X entity, Y value)
Sets the attribute to the given value on the given entity.
-
-
-
Method Detail
-
get
Y get(X entity)
Returns the attribute value of the given entity.- Parameters:
entity
- The entity- Returns:
- the attribute value
-
getNullSafe
Y getNullSafe(X entity)
Returns the attribute value of the given entity or null if the entity is null.- Parameters:
entity
- The entity- Returns:
- the attribute value or null if the entity is null
-
-