public MultiValueAttribute(Class<O> objectType, Class<EntityHandle<O>> handleType, Class<A> attributeType) { super(handleType, attributeType); this.objectType = objectType; cachedHashCode = calculateHashCode(); }
/** * Creates a MultiValueIndex with a function that can access {@link QueryOptions} * @param function * @param <O> * @param <A> * @return */ static <O extends Entity, A> MultiValueIndex<O, A> as(Function<O, Iterable<A>> function) { return new WrappedMultiValueIndex<>(function); }
/** * Creates a SimpleIndex with a function that can access {@link QueryOptions} * * @param function * @param <O> * @param <A> * @return */ static <O extends Entity, A> SimpleIndex<O, A> withQueryOptions(BiFunction<O, QueryOptions, A> function) { return new WrappedSimpleIndex<>(function); }
@Override public String toString() { return "MultiValueAttribute{" + "objectType=" + getEffectiveObjectType() + ", attributeType=" + getAttributeType() + ", attributeName='" + getAttributeName() + '\'' + '}'; } }
@Override public String toString() { return "SimpleAttribute{" + "objectType=" + getEffectiveObjectType() + ", attributeType=" + getAttributeType() + ", attributeName='" + getAttributeName() + '\'' + '}'; } }
public SimpleAttribute(Class<O> objectType, Class<EntityHandle<O>> handleType, Class<A> attributeType) { super(handleType, attributeType); this.objectType = objectType; cachedHashCode = calculateHashCode(); }
@Override protected void doStart() { notifyStarted(); }
default Type getAttributeReflectedType() { return getAttributeType(); } }
@Override protected void doStart() { super.doStart(); }
@Override public Object getValue(Entity object, QueryOptions queryOptions) { return ((SimpleIndex) index).getValue(object, queryOptions); } }
@Override public Iterable<Object> getValues(Entity object, QueryOptions queryOptions) { return index.getValues(object, queryOptions); } }
@Override public ObjectStore<EntityHandle<T>> createObjectStore() { return new CommandJournalObjectStore<>(journal, klass); }
@Override public ObjectStore<EntityHandle<T>> createObjectStore() { return new EventJournalObjectStore<>(journal, klass); }
public MultiValueAttribute(Class<O> objectType, Class<EntityHandle<O>> handleType, Class<A> attributeType, String attributeName) { super(handleType, attributeType, attributeName); this.objectType = objectType; cachedHashCode = calculateHashCode(); }
public SimpleAttribute(Class<O> objectType, Class<EntityHandle<O>> handleType, Class<A> attributeType, String attributeName) { super(handleType, attributeType, attributeName); this.objectType = objectType; cachedHashCode = calculateHashCode(); }
/** * Creates a MultiValueIndex with a function that can access {@link QueryOptions} * @param function * @param <O> * @param <A> * @return */ static <O extends Entity, A> MultiValueIndex<O, A> withQueryOptions(BiFunction<O, QueryOptions, Iterable<A>> function) { return new WrappedMultiValueIndex<>(function); }
/** * Creates a SimpleIndex * * @param function * @param <O> * @param <A> * @return */ static <O extends Entity, A> SimpleIndex<O, A> as(Function<O, A> function) { return new WrappedSimpleIndex<>(function); }
public MultiValueAttribute(String attributeName) { super(attributeName); cachedHashCode = calculateHashCode(); }
public SimpleAttribute() { super(); cachedHashCode = calculateHashCode(); }