Examples of Persister


Examples of com.google.sitebricks.persist.Persister

    config2.setPartitionCount(1);
    config2.setMaxConnectionsPerPartition(2);
  }

  private static void createTable(Injector injector, Class<? extends Annotation> selector) {
    Persister persister = injector.getInstance(Key.get(Persister.class, selector));
    persister.call(new Persister.InWork() {
      @Override
      public Object perform(EntityStore es) throws Throwable {
        ((Sql) es.delegate()).execute("create table my_table (id integer, name text not null)");
        return null;
      }
    });

    final AtomicBoolean tableExists = new AtomicBoolean();
    persister.call(new Persister.InWork() {
      @Override
      public Object perform(EntityStore es) throws Throwable {
        tableExists.set(((Sql) es.delegate()).tableExists("my_table"));
        return null;
      }
View Full Code Here

Examples of com.googlecode.objectify.persister.operation.Persister

  public <T> Map<Key<T>, T> put(Iterable<? extends T> objs) {

    Map<Key<T>, T> map = new HashMap<Key<T>, T>();

    Persister persister = new Persister(base, factory);

    for (T obj : objs) {
      persister.persiste(obj);
      Key<T> key = factory.getKey(obj);
      map.put(key, obj);
    }

    return map;
View Full Code Here

Examples of com.googlecode.objectify.persister.operation.Persister

  public <T extends Object> Map<Key<T>, T> put(T... objs) {
    return put(Arrays.asList(objs));
  }

  public <T extends Object> Key<T> put(T obj) {
    new Persister(base, factory).persiste(obj);
    return factory.getKey(obj);
  };
View Full Code Here

Examples of com.ovea.jetty.session.serializer.jboss.serial.persister.Persister

    public boolean doneReplacing(ObjectsCache cache, Object newObject, Object oldObject, ClassMetaData oldMetaData) throws IOException {
        return (newObject == null || newObject == oldObject || newObject.getClass() == oldMetaData.getClazz());
    }

    public void writeObject(JBossSeralizationOutputInterface output, ObjectsCache cache, ClassMetaData metadata, Object obj) throws IOException {
        Persister persister = PersistResolver.resolvePersister(obj, metadata);
        output.writeByte(persister.getId());
        persister.writeData(metadata, cache.getOutput(), obj, cache.getSubstitution());
    }
View Full Code Here

Examples of org.hibernate.annotations.Persister

    }

    collection.setMutable( !property.isAnnotationPresent( Immutable.class ) );
    OptimisticLock lockAnn = property.getAnnotation( OptimisticLock.class );
    if ( lockAnn != null ) collection.setOptimisticLocked( !lockAnn.excluded() );
    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) collection.setCollectionPersisterClass( persisterAnn.impl() );

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
      collection.setSorted( true );
View Full Code Here

Examples of org.hibernate.annotations.Persister

    persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
    persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );

    //set persister if needed
    //@Persister has precedence over @Entity.persister
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isDefault( entityAnn.persister() ) ) {
        try {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    final boolean includeInOptimisticLockChecks = ( lockAnn != null )
        ? ! lockAnn.excluded()
        : ! isMappedBy;
    collection.setOptimisticLocked( includeInOptimisticLockChecks );

    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) {
      collection.setCollectionPersisterClass( persisterAnn.impl() );
    }

    applySortingAndOrdering( collection );

    //set cache
View Full Code Here

Examples of org.hibernate.annotations.Persister

    }
    persistentClass.setOptimisticLockStyle( getVersioning( optimisticLockType ) );
    persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );

    //set persister if needed
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isEmptyAnnotationValue( entityAnn.persister() ) ) {
        try {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    collection.setMutable( !property.isAnnotationPresent( Immutable.class ) );
    OptimisticLock lockAnn = property.getAnnotation( OptimisticLock.class );
    if ( lockAnn != null ) collection.setOptimisticLocked( !lockAnn.excluded() );

    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) {
      collection.setCollectionPersisterClass( persisterAnn.impl() );
    }

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
    persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );

    //set persister if needed
    //@Persister has precedence over @Entity.persister
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isDefault( entityAnn.persister() ) ) {
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.