Examples of AnnotatedPropertyCriteria


Examples of org.jboss.solder.properties.query.AnnotatedPropertyCriteria

        updatePrincipal(entity);
    }

    private void updatePrincipal(Object entity) {
        PropertyQuery<Object> query = PropertyQueries.<Object>createQuery(entity.getClass())
                .addCriteria(new AnnotatedPropertyCriteria(ModifiedBy.class));
        for (Property<Object> property : query.getWritableResultList()) {
            setProperty(entity, property);
        }
    }
View Full Code Here

Examples of org.jboss.solder.properties.query.AnnotatedPropertyCriteria

        }
    }
   
    private static List<PropertyCriteria> criteriaList(Class<?> entityClass) {
        List<PropertyCriteria> criteria = new LinkedList<PropertyCriteria>();
        criteria.add(new AnnotatedPropertyCriteria(Id.class));
        criteria.add(new AnnotatedPropertyCriteria(EmbeddedId.class));
        String fromMappingFiles = PersistenceUnits.instance().primaryKeyField(entityClass);
        if (fromMappingFiles != null) {
            criteria.add(new NamedPropertyCriteria(fromMappingFiles));
        }
        return criteria;
View Full Code Here

Examples of org.jboss.solder.properties.query.AnnotatedPropertyCriteria

   
    private void updateTimestamps(Object entity, boolean create) {
        long systime = System.currentTimeMillis();
        List<Property<Object>> properties = new LinkedList<Property<Object>>();
        PropertyQuery<Object> query = PropertyQueries.<Object>createQuery(entity.getClass())
                .addCriteria(new AnnotatedPropertyCriteria(ModifiedOn.class));
        properties.addAll(query.getWritableResultList());
        if (create) {
            query = PropertyQueries.<Object>createQuery(entity.getClass())
                    .addCriteria(new AnnotatedPropertyCriteria(CreatedOn.class));
            properties.addAll(query.getWritableResultList());
        }
        for (Property<Object> property : properties) {
            setProperty(entity, property, systime, create);
        }
View Full Code Here

Examples of org.jboss.solder.properties.query.AnnotatedPropertyCriteria

        updatePrincipal(entity);
    }

    private void updatePrincipal(Object entity) {
        PropertyQuery<Object> query = PropertyQueries.<Object>createQuery(entity.getClass())
                .addCriteria(new AnnotatedPropertyCriteria(ModifiedBy.class));
        for (Property<Object> property : query.getWritableResultList()) {
            setProperty(entity, property);
        }
    }
View Full Code Here

Examples of org.jboss.solder.properties.query.AnnotatedPropertyCriteria

        }
    }
   
    private static List<PropertyCriteria> criteriaList(Class<?> entityClass) {
        List<PropertyCriteria> criteria = new LinkedList<PropertyCriteria>();
        criteria.add(new AnnotatedPropertyCriteria(Id.class));
        criteria.add(new AnnotatedPropertyCriteria(EmbeddedId.class));
        String fromMappingFiles = PersistenceUnits.instance().primaryKeyField(entityClass);
        if (fromMappingFiles != null) {
            criteria.add(new NamedPropertyCriteria(fromMappingFiles));
        }
        return criteria;
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.