Package de.spotnik.persistence

Examples of de.spotnik.persistence.AbstractEntity


    /* @see de.spotnik.persistence.nestedset.NestedSetDAO#contains(T) */
    @Override
    public boolean contains( EmailNode node) throws DatabaseException
    {
        boolean exists = false;
        AbstractEntity result;
        Query query = this.createQuery( "select EmailNode n where n.attributes.email = :email");

        query.setString( "email", node.getAttributes().getEmailAddess());

        result = find( query);
View Full Code Here


    @Override
    public boolean onSave( Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
    {
        if( entity instanceof AbstractEntity)
        {
            AbstractEntity baseEntity = (AbstractEntity) entity;
           
            if( baseEntity.getCreated() == null)
            {
                baseEntity.setCreated(new Date());
            }
           
            baseEntity.setModified(new Date());
        }
       
        return super.onSave(entity, id, state, propertyNames, types);
    }
View Full Code Here

TOP

Related Classes of de.spotnik.persistence.AbstractEntity

Copyright © 2018 www.massapicom. 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.