com.gs.fw.common.mithra.list.MithraDelegatedList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reladomo Show documentation
Show all versions of reladomo Show documentation
Reladomo is an object-relational mapping framework.
/*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package com.gs.fw.common.mithra.list;
import com.gs.fw.common.mithra.MithraList;
import com.gs.fw.common.mithra.MithraTransactionalList;
import com.gs.fw.common.mithra.cache.Index;
import com.gs.fw.common.mithra.finder.AbstractRelatedFinder;
import com.gs.fw.common.mithra.finder.orderby.OrderBy;
import com.gs.fw.common.mithra.list.merge.TopLevelMergeOptions;
import com.gs.fw.common.mithra.notification.listener.MithraApplicationNotificationListener;
import com.gs.fw.common.mithra.util.DoWhileProcedure;
import com.gs.fw.common.mithra.util.Filter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
public interface MithraDelegatedList extends Serializable
{
public void sortWith(DelegatingList delegatingList, OrderBy orderBy);
public boolean isOperationBased();
public void forceResolve(DelegatingList delegatingList);
public void forceRefresh(DelegatingList delegatingList);
public boolean isStale(DelegatingList delegatingList);
public int count(DelegatingList delegatingList);
public MithraDelegatedList setMaxObjectsToRetrieve(DelegatingList delegatingList, int count);
public boolean reachedMaxObjectsToRetrieve(DelegatingList delegatingList);
public MithraDelegatedList registerForNotification(DelegatingList delegatingList, MithraApplicationNotificationListener listener);
public Index getInternalIndex(DelegatingList delegatingList);
/**
* Iterates through the list using a {@link com.gs.fw.common.mithra.list.cursor.Cursor}.
*
* This method executes the closure given as an argument for every items of
* the list. It stops as soon as the list is empty or when the closure's
* {@link DoWhileProcedure#execute(Object)} operation returns false.
* This method should be used for huge lists constructed from operations
* (and to be effective on entities configured with a partial cache).
* It doesn't load all the objects in memory but loads them one by one
* in the weak part of the cache (while iterating).
* The deepFetch operation is not supported and should not be invoked prior
* to using this operation (use iterator() if deepfetch is needed).
*
*
*
* @param delegatingList
* @param closure The code that will be executed for each element of the list.
*/
public void forEachWithCursor(DelegatingList delegatingList, DoWhileProcedure closure);
public void forEachWithCursor(DelegatingList delegatingList, DoWhileProcedure closure, Filter filter);
/**
* Clears the list of resolved references.
* This method will clear its internal list of results making all the referenced objects
* eligible for garbage collection.
*
* Be aware that calling any method on a list (i.e. size()) after calling this method will cause,
* in an operation based list, that the list resolve the operation again.
*
* Calling this method has no effect on non operation based lists.
* @param delegatingList
*/
public void clearResolvedReferences(DelegatingList delegatingList);
public boolean isModifiedSinceDetachment(DelegatingList delegatingList);
public void incrementalDeepFetch(DelegatingList delegatingList);
public MithraList resolveRelationship(DelegatingList delegatingList, AbstractRelatedFinder finder);
public MithraList zCloneForRelationship(DelegatingList delegatingList);
public MithraDelegatedList setNumberOfParallelThreads(DelegatingList delegatingList, int numberOfThreads);
public int getNumberOfParallelThreads();
public void zMarkMoved(DelegatingList delegatingList, E item);
public MithraDelegatedList setForceImplicitJoin(DelegatingList delegatingList, boolean forceImplicitJoin);
public void init(DelegatingList delegatingList, int initialSize);
public void init(DelegatingList delegatingList, Collection c);
public MithraDelegatedList prepareForCount();
public MithraDelegatedList getNonPersistentDelegate();
public void writeObject(DelegatingList delegatingList, ObjectOutputStream out) throws IOException;
public void readObject(DelegatingList delegatingList, ObjectInputStream in) throws IOException, ClassNotFoundException;
// methods from List
public int size(DelegatingList delegatingList);
public boolean contains(DelegatingList delegatingList, Object o);
public Object[] toArray(DelegatingList delegatingList);
public T[] toArray(DelegatingList delegatingList, T[] a);
public boolean add(DelegatingList delegatingList, E e);
public boolean remove(DelegatingList delegatingList, Object o);
public boolean containsAll(DelegatingList delegatingList, Collection> c);
public boolean addAll(DelegatingList delegatingList, Collection extends E> c);
public boolean addAll(DelegatingList delegatingList, int index, Collection extends E> c);
public boolean removeAll(DelegatingList delegatingList, Collection> c);
public boolean retainAll(DelegatingList delegatingList, Collection> c);
public void clear(DelegatingList delegatingList);
public boolean equals(DelegatingList delegatingList, Object o);
public int hashCode(DelegatingList delegatingList);
public E get(DelegatingList delegatingList, int index);
public E set(DelegatingList delegatingList, int index, E element);
public void add(DelegatingList delegatingList, int index, E element);
public E remove(DelegatingList delegatingList, int index);
public int indexOf(DelegatingList delegatingList, Object o);
public int lastIndexOf(DelegatingList delegatingList, Object o);
public ListIterator listIterator(DelegatingList delegatingList);
public ListIterator listIterator(DelegatingList delegatingList, int index);
public List subList(DelegatingList delegatingList, int fromIndex, int toIndex);
public Iterator iterator(DelegatingList delegatingList);
public MithraList asAdhoc(DelegatingList delegatingList);
public void merge(DelegatingList adhoc, MithraList incoming, TopLevelMergeOptions mergeOptions);
}