TEntity - The type of the entity.T - The type of the transacted property.public abstract class EntityTransactedPropertyGetter<TEntity,T> extends Delegate
| Modifier and Type | Class and Description |
|---|---|
static interface |
EntityTransactedPropertyGetter.Function<TEntity,T>
A functional interface for the containing delegate type.
|
| Constructor and Description |
|---|
EntityTransactedPropertyGetter()
Creates a new instance of this delegate.
|
EntityTransactedPropertyGetter(Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke a static method on a class.
|
EntityTransactedPropertyGetter(Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke an instance method on a class instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract TransactedProperty<T> |
invoke(TEntity entity)
Represents a method to get a transacted property on an entity.
|
static <TEntity,T> |
of(EntityTransactedPropertyGetter.Function<TEntity,T> f)
Create a delegate for the given interface.
|
static <TEntity,T> |
of(EntityTransactedPropertyGetter.Function<TEntity,T> f,
Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
static <TEntity,T> |
of(EntityTransactedPropertyGetter.Function<TEntity,T> f,
Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
public EntityTransactedPropertyGetter()
public EntityTransactedPropertyGetter(@Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetObject - The class instance on which the delegate will invoke the method.methodName - The name of the instance method.methodParameterClasses - The type of the parameters of the instance method.public EntityTransactedPropertyGetter(@Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetClass - The class that defines the method.methodName - The name of the static method.methodParameterClasses - The type of the parameters of the static method.public abstract TransactedProperty<T> invoke(@Nonnull TEntity entity)
entity - The entity on which to get the transacted property.TransactedProperty.@Nonnull public static <TEntity,T> EntityTransactedPropertyGetter<TEntity,T> of(@Nonnull EntityTransactedPropertyGetter.Function<TEntity,T> f)
f - The function which will be invoked.@Nonnull public static <TEntity,T> EntityTransactedPropertyGetter<TEntity,T> of(@Nonnull EntityTransactedPropertyGetter.Function<TEntity,T> f, @Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f - The function which will be invoked.targetObject - The class instance on which the delegate will invoke the method.methodName - The name of the instance method.methodParameterClasses - The type of the parameters of the instance method.@Nonnull public static <TEntity,T> EntityTransactedPropertyGetter<TEntity,T> of(@Nonnull EntityTransactedPropertyGetter.Function<TEntity,T> f, @Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f - The function which will be invoked.targetClass - The class that defines the method.methodName - The name of the static method.methodParameterClasses - The type of the parameters of the static method.