📄 basedaofindermethods.svm
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -