basedaofindermethods.svm

来自「一个购房管理系统,JSF+Hibernate+Mssql2」· SVM 代码 · 共 99 行

SVM
99
字号
#if ($class.ParentRoot.Id)
	public ${class.AbsoluteValueObjectSignatureClassName} get(${class.ParentRoot.Id.Property.AbsoluteSignatureClassName} key)
#if ($exceptionClass)
		throws ${exceptionClass} {
#else
	{
#end
#if ($class.ParentRoot.Id.Property.isPrimitive())
		return (${class.AbsoluteValueObjectSignatureClassName}) get(getReferenceClass(), new ${class.ParentRoot.Id.Property.ObjectClass}(key));
#else
		return (${class.AbsoluteValueObjectSignatureClassName}) get(getReferenceClass(), key);
#end
	}

	public ${class.AbsoluteValueObjectSignatureClassName} get(${class.ParentRoot.Id.Property.AbsoluteSignatureClassName} key, Session s)
#if ($exceptionClass)
		throws ${exceptionClass} {
#else
	{
#end
#if ($class.ParentRoot.Id.Property.isPrimitive())
		return (${class.AbsoluteValueObjectSignatureClassName}) get(getReferenceClass(), new ${class.ParentRoot.Id.Property.ObjectClass}(key), s);
#else
		return (${class.AbsoluteValueObjectSignatureClassName}) get(getReferenceClass(), key, s);
#end
	}

	public ${class.AbsoluteValueObjectSignatureClassName} load(${class.ParentRoot.Id.Property.AbsoluteSignatureClassName} key)
#if ($exceptionClass)
		throws ${exceptionClass} {
#else
	{
#end
#if ($class.ParentRoot.Id.Property.isPrimitive())
		return (${class.AbsoluteValueObjectSignatureClassName}) load(getReferenceClass(), new ${class.ParentRoot.Id.Property.ObjectClass}(key));
#else
		return (${class.AbsoluteValueObjectSignatureClassName}) load(getReferenceClass(), key);
#end
	}

	public ${class.AbsoluteValueObjectSignatureClassName} load(${class.ParentRoot.Id.Property.AbsoluteSignatureClassName} key, Session s)
#if ($exceptionClass)
		throws ${exceptionClass} {
#else
	{
#end
#if ($class.ParentRoot.Id.Property.isPrimitive())
		return (${class.AbsoluteValueObjectSignatureClassName}) load(getReferenceClass(), new ${class.ParentRoot.Id.Property.ObjectClass}(key), s);
#else
		return (${class.AbsoluteValueObjectSignatureClassName}) load(getReferenceClass(), key, s);
#end
	}

	public ${class.AbsoluteValueObjectSignatureClassName} loadInitialize(${class.ParentRoot.Id.Property.AbsoluteSignatureClassName} key, Session s) 
#if ($exceptionClass) 
			throws ${exceptionClass} { 
#else 
	{ 
#end 
		${class.AbsoluteValueObjectSignatureClassName} obj = load(key, s); 
		if (!Hibernate.isInitialized(obj)) {
			Hibernate.initialize(obj);
		} 
		return obj; 
	}
#end
#foreach ($prop in $class.AllProperties)
#if ($prop.FinderMethod)

	public java.util.List<${class.AbsoluteValueObjectSignatureClassName}> $prop.FinderMethod (${prop.AbsoluteSignatureClassName} ${prop.VarName}) {
		return findFiltered ("$!{prop.Name}", ${prop.VarName}).list();
	}
#end
#end

/* Generic methods */

	/**
	 * Return all objects related to the implementation of this DAO with no filter.
	 */
	public java.util.List<${class.AbsoluteValueObjectSignatureClassName}> findAll () {
		return super.findAll();
	}

	/**
	 * Return all objects related to the implementation of this DAO with no filter.
	 */
	public java.util.List<${class.AbsoluteValueObjectSignatureClassName}> findAll (Order defaultOrder) {
		return super.findAll(defaultOrder);
	}

	/**
	 * Return all objects related to the implementation of this DAO with no filter.
	 * Use the session given.
	 * @param s the Session
	 */
	public java.util.List<${class.AbsoluteValueObjectSignatureClassName}> findAll (Session s, Order defaultOrder) {
		return super.findAll(s, defaultOrder);
	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?