docs: private T onBeforeUpdate(T entity) {
  		// TODO 更新前的操作
  		Class<?> cls = entity.getClass();
  		String entityName = cls.getName();
  		String idFieldName = getIdFieldName(cls);
  		ID id = entity.getId();
  		
  		String indexName = DaoHelper.getExtendFieldName(cls, ExtendField.Index);
  		String pathName = DaoHelper.getExtendFieldName(cls, ExtendField.Path);
  		String parentName = DaoHelper.getExtendFieldName(cls, ExtendField.Parent);
  		
  		System.out.println(indexName + "," + pathName + "," + parentName);
  		
  		// 可记录时间的
  		if (Dateable.class.isAssignableFrom(cls)) {
  			((Dateable) entity).setLastModifiedDate(Calendar.getInstance().getTime());
  		}
  		
  		// 可树形结构化的
  		if (Treeable.class.isAssignableFrom(cls)) {
  			// 判断自身位置有没有发生变化
  			Treeable currObject = (Treeable) entity;
  			Serializable newParentId = currObject.getParent();
  			Treeable dbObject = (Treeable) getCurrentSession().get(cls, id);
  			Serializable oldParentId = dbObject.getParent();
  			
  			System.out.println("newParentId:" + newParentId + " --> oldParentId:" + oldParentId);
  			
  			// 跨层级移动
  			if( notNull(newParentId) && ( !newParentId.equals( oldParentId ) ) ){
  				String oldPath = dbObject.getPath();
  				Treeable newParent = (Treeable) getCurrentSession().get(cls, newParentId);
  				String newPath =  newParent.getPath() + id.toString() + "/";
  				currObject.setPath(newPath);
  				
  				System.out.println( "newPath:" + newPath + " --> oldPath:" + oldPath );
  				
  				//1.修改自身的排位
  				Object maxVal = createCriteria(cls).add(Restrictions.eq(parentName, currObject.getParent())).setProjection(Projections.max(indexName)).uniqueResult();
  				currObject.setIndex( isNull(maxVal) ? 1 : (Integer.valueOf(maxVal.toString()) + 1) );
  				//2.如果自身的下级节点路劲：截取dbObject的path 换成	currentObject的path
  				int subStart = oldPath.length() + 1;
  				String hql = "update " + entityName + " set "+pathName+" = Concat(?, Substring( "+pathName+", "+subStart+", Length("+pathName+") )) where "+pathName+" like ?";
  				getCurrentSession().createQuery(hql)
  					.setParameter(0, newPath)
  					.setParameter(1, oldPath +"_%")
  					.executeUpdate();
  			}
  			// 同级之间移动
  			else if( ! dbObject.getIndex().equals(currObject.getIndex()) ){
  				// 更新目标节点的位置
  				String hql = "update " + entityName + " set "+indexName+"=? where "+parentName+"=? and "+indexName+"=?";
  				createQuery(hql)
  					.setParameter(0, dbObject.getIndex())
  					.setParameter(1, dbObject.getParent())
  					.setParameter(2, currObject.getIndex())
  					.executeUpdate();
  			}
  			
  		}
  		// 可移动的
  		else if (Movable.class.isAssignableFrom(cls)) {
  			Movable currObject = (Movable) entity;
  			Movable dbObject = (Movable) getCurrentSession().get(cls, entity.getId());
  			if( ! dbObject.getIndex().equals(currObject.getIndex()) ){
  				String hql = "update " + entityName + " set "+indexName+"=? where "+indexName+"=? ";
  				createQuery(hql)
  					.setParameter(0, currObject.getIndex())
  					.setParameter(1, dbObject.getIndex())
  					.executeUpdate();
  			}
  		}
  		
  		return entity;
  	}