private Entity<? extends Serializable> onAfterSave(
			Entity<? extends Serializable> entity) {
		Class<?> cls = entity.getClass();
		if (Treeable.class.isAssignableFrom(cls)) {
			Treeable self = (Treeable) entity;
			if (notNull(self.getParent())) {
				Treeable parent = (Treeable) getCurrentSession().get(cls,
						self.getParent());
				self.setPath(parent.getPath() + entity.getId().toString() + "/");
				getCurrentSession().update(self);
			}
		}
		return entity;
	}
private Entity < ? extends Serializable > onAfterSave ( Entity < ? extends Serializable > entity ) { Class < ? > cls = entity . getClass ( ) ; if ( Treeable . class . isAssignableFrom ( cls ) ) { Treeable self = ( Treeable ) entity ; if ( notNull ( self . getParent ( ) ) ) { Treeable parent = ( Treeable ) getCurrentSession ( ) . get ( cls , self . getParent ( ) ) ; self . setPath ( parent . getPath ( ) + entity . getId ( ) . toString ( ) + "/" ) ; getCurrentSession ( ) . update ( self ) ; } } return entity ; }
新增实体之后的处理

@param entity
@return