Codota Logo
org.hibernate.collection.internal
Code IndexAdd Codota to your IDE (free)

How to use org.hibernate.collection.internal

Best Java code snippets using org.hibernate.collection.internal (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate-orm

/**
 * After reading all existing elements from the database,
 * add the queued elements to the underlying collection.
 */
protected final void performQueuedOperations() {
  for ( DelayedOperation operation : operationQueue ) {
    operation.operate();
  }
  clearOperationQueue();
}
origin: hibernate/hibernate-orm

/**
 * Is this collection in a state that would allow us to
 * "queue" clear? This is a special case, because of orphan
 * delete.
 */
@SuppressWarnings({"JavaDoc"})
protected boolean isClearQueueEnabled() {
  return !initialized
      && isConnectedToSession()
      && isInverseCollectionNoOrphanDelete();
}
origin: hibernate/hibernate-orm

/**
 * Called by any writer method of the collection interface
 */
protected final void write() {
  initialize( true );
  dirty();
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public boolean add(Object object) {
  if ( !isOperationQueueEnabled() ) {
    write();
    return list.add( object );
  }
  else {
    queueOperation( new SimpleAdd( object ) );
    return true;
  }
}
origin: hibernate/hibernate-orm

@Override
public Collection getOrphans(Serializable snapshot, String entityName) throws HibernateException {
  final List sn = (List) snapshot;
  return getOrphans( sn, bag, entityName, getSession() );
}
origin: hibernate/hibernate-orm

@Override
public Collection getOrphans(Serializable snapshot, String entityName) throws HibernateException {
  final List sn = (List) snapshot;
  return getOrphans( sn, list, entityName, getSession() );
}
origin: hibernate/hibernate-orm

@Override
public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) {
  PersistentSortedMap map = new PersistentSortedMap(session);
  map.setComparator(comparator);
  return map;
}
origin: hibernate/hibernate-orm

@Override
public List subList(int fromIndex, int toIndex) {
  read();
  return new ListProxy( values.subList( fromIndex, toIndex ) );
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public SortedMap tailMap(Object fromKey) {
  read();
  final SortedMap tailMap = ( (SortedMap) map ).tailMap( fromKey );
  return new SortedSubMap( tailMap );
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public ListIterator listIterator(int index) {
  read();
  return new ListIteratorProxy( list.listIterator( index ) );
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public ListIterator listIterator(int i) {
  read();
  return new ListIteratorProxy( bag.listIterator( i ) );
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public SortedSet subSet(Object fromElement, Object toElement) {
  read();
  final SortedSet subSet = ( (SortedSet) set ).subSet( fromElement, toElement );
  return new SubSetProxy( subSet );
}
origin: hibernate/hibernate-orm

@Override
public void postAction() {
  clearOperationQueue();
  cachedSize = -1;
  clearDirty();
}
origin: hibernate/hibernate-orm

@Override
public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) {
  return new PersistentMap( session, (java.util.Map) collection );
}
origin: hibernate/hibernate-orm

@Override
public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) {
  return new PersistentBag( session, (Collection) collection );
}
origin: hibernate/hibernate-orm

/**
 * Called by any read-only method of the collection interface
 */
protected final void read() {
  initialize( false );
}
origin: hibernate/hibernate-orm

@Override
public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key)
throws HibernateException {
  return new PersistentArrayHolder(session, persister);
}
origin: hibernate/hibernate-orm

/**
 * Constructs a PersistentCollection instance for holding an array.
 *
 * @param session The session
 * @param array The array (the persistent "collection").
 */
public PersistentArrayHolder(SharedSessionContractImplementor session, Object array) {
  super( session );
  this.array = array;
  setInitialized();
}
origin: hibernate/hibernate-orm

@Override
public boolean endRead() {
  //override on some subclasses
  return afterInitialize();
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public Iterator entries(CollectionPersister persister) {
  return elements();
}
org.hibernate.collection.internal

Most used classes

  • PersistentSet
    A persistent wrapper for a java.util.Set. The underlying collection is a HashSet .
  • PersistentBag
    An unordered, unkeyed collection that can contain the same element multiple times. The Java collecti
  • AbstractPersistentCollection
  • PersistentList
    A persistent wrapper for a java.util.List. Underlying collection is an ArrayList .
  • PersistentMap
    A persistent wrapper for a java.util.Map. Underlying collection is a HashMap.
  • PersistentSortedMap,
  • PersistentSortedSet,
  • AbstractPersistentCollection$DelayedOperation,
  • AbstractPersistentCollection$IteratorProxy,
  • AbstractPersistentCollection$ListIteratorProxy,
  • AbstractPersistentCollection$ListProxy,
  • AbstractPersistentCollection$SetProxy,
  • PersistentArrayHolder,
  • PersistentBag$Clear,
  • PersistentBag$SimpleAdd,
  • PersistentList$Clear,
  • PersistentList$Remove,
  • PersistentList$Set,
  • PersistentList$SimpleAdd
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now