org.hibernate.collection.PersistentList Java Examples

The following examples show how to use org.hibernate.collection.PersistentList. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListType.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) {
	if ( session.getEntityMode()==EntityMode.DOM4J ) {
		return new PersistentListElementHolder(session, persister, key);
	}
	else {
		return new PersistentList(session);
	}
}
 
Example #2
Source File: ListType.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public PersistentCollection wrap(SessionImplementor session, Object collection) {
	if ( session.getEntityMode()==EntityMode.DOM4J ) {
		return new PersistentListElementHolder( session, (Element) collection );
	}
	else {
		return new PersistentList( session, (List) collection );
	}
}
 
Example #3
Source File: PortfolioRepositoryHandler.java    From olat with Apache License 2.0 5 votes vote down vote up
/**
* 
*/
  protected PortfolioRepositoryHandler() {
      supportedTypes = new ArrayList<String>(1);
      supportedTypes.add(EPTemplateMapResource.TYPE_NAME);

      myStream.alias("defaultMap", EPDefaultMap.class);
      myStream.alias("structureMap", EPStructuredMap.class);
      myStream.alias("templateMap", EPStructuredMapTemplate.class);
      myStream.alias("structure", EPStructureElement.class);
      myStream.alias("page", EPPage.class);
      myStream.alias("structureToArtefact", EPStructureToArtefactLink.class);
      myStream.alias("structureToStructure", EPStructureToStructureLink.class);
      myStream.alias("collectionRestriction", CollectRestriction.class);

      myStream.alias("org.olat.resource.OLATResourceImpl", OLATResourceImpl.class);
      myStream.alias("OLATResource", OLATResourceImpl.class);

      myStream.alias("org.olat.basesecurity.SecurityGroupImpl", SecurityGroupImpl.class);
      myStream.alias("SecurityGroupImpl", SecurityGroupImpl.class);

      myStream.alias("org.olat.basesecurity.SecurityGroup", SecurityGroup.class);
      myStream.alias("SecurityGroup", SecurityGroup.class);

      myStream.alias("org.olat.core.id.Persistable", Persistable.class);
      myStream.alias("Persistable", Persistable.class);

      myStream.alias("org.hibernate.proxy.HibernateProxy", HibernateProxy.class);
      myStream.alias("HibernateProxy", HibernateProxy.class);

      myStream.omitField(EPStructuredMapTemplate.class, "ownerGroup");
      myStream.addDefaultImplementation(PersistentList.class, List.class);
      myStream.addDefaultImplementation(ArrayList.class, List.class);
      myStream.registerConverter(new CollectionConverter(myStream.getMapper()) {
          @Override
          public boolean canConvert(final Class type) {
              return PersistentList.class == type;
          }
      });
  }
 
Example #4
Source File: PortfolioRepositoryHandler.java    From olat with Apache License 2.0 5 votes vote down vote up
/**
* 
*/
  protected PortfolioRepositoryHandler() {
      supportedTypes = new ArrayList<String>(1);
      supportedTypes.add(EPTemplateMapResource.TYPE_NAME);

      myStream.alias("defaultMap", EPDefaultMap.class);
      myStream.alias("structureMap", EPStructuredMap.class);
      myStream.alias("templateMap", EPStructuredMapTemplate.class);
      myStream.alias("structure", EPStructureElement.class);
      myStream.alias("page", EPPage.class);
      myStream.alias("structureToArtefact", EPStructureToArtefactLink.class);
      myStream.alias("structureToStructure", EPStructureToStructureLink.class);
      myStream.alias("collectionRestriction", CollectRestriction.class);

      myStream.alias("org.olat.resource.OLATResourceImpl", OLATResourceImpl.class);
      myStream.alias("OLATResource", OLATResourceImpl.class);

      myStream.alias("org.olat.basesecurity.SecurityGroupImpl", SecurityGroupImpl.class);
      myStream.alias("SecurityGroupImpl", SecurityGroupImpl.class);

      myStream.alias("org.olat.basesecurity.SecurityGroup", SecurityGroup.class);
      myStream.alias("SecurityGroup", SecurityGroup.class);

      myStream.alias("org.olat.core.id.Persistable", Persistable.class);
      myStream.alias("Persistable", Persistable.class);

      myStream.alias("org.hibernate.proxy.HibernateProxy", HibernateProxy.class);
      myStream.alias("HibernateProxy", HibernateProxy.class);

      myStream.omitField(EPStructuredMapTemplate.class, "ownerGroup");
      myStream.addDefaultImplementation(PersistentList.class, List.class);
      myStream.addDefaultImplementation(ArrayList.class, List.class);
      myStream.registerConverter(new CollectionConverter(myStream.getMapper()) {
          @Override
          public boolean canConvert(final Class type) {
              return PersistentList.class == type;
          }
      });
  }
 
Example #5
Source File: HibernateMapper.java    From projectforge-webapp with GNU General Public License v3.0 5 votes vote down vote up
public void init()
{
  collectionMap.put(PersistentBag.class, ArrayList.class);
  collectionMap.put(PersistentList.class, ArrayList.class);
  collectionMap.put(PersistentMap.class, HashMap.class);
  collectionMap.put(PersistentSet.class, HashSet.class);
  collectionMap.put(PersistentSortedMap.class, TreeMap.class);
  collectionMap.put(PersistentSortedSet.class, TreeSet.class);
}