📄 basevalueobjectidgettersetter.svm
字号:
#if (!$class.isSubclass() || !$class.Id.Properties.indexOf($prop) > 0)
#if ($class.Id)
#if ($class.Id.hasExternalClass())
/**
* Return the unique identifier of this class
* @hibernate.id
#if ($class.Id.Generator)
* generator-class="${class.Id.Generator.GeneratorClass}"
#end
#if (!$class.Id.isComposite())
* column="$!{class.Id.Property.Column}"
#end
*/
public ${class.Id.Property.AbsoluteSignatureClassName} ${class.Id.Property.GetterName} () {
return ${class.Id.Property.VarName};
}
/**
* Set the unique identifier of this class
* @param ${class.Id.Property.VarName} the new ID
*/
public void ${class.Id.Property.SetterName} (${class.Id.Property.AbsoluteSignatureClassName} ${class.Id.Property.VarName}) {
this.${class.Id.Property.VarName} = ${class.Id.Property.VarName};
this.hashCode = Integer.MIN_VALUE;
}
#else
#foreach ($prop in $class.Id.Properties)
/**
* @hibernate.property
* column=${prop.Column}
* not-null=true
*/
public ${prop.AbsoluteSignatureClassName} ${prop.GetterName} () {
return this.${prop.VarName};
}
/**
* Set the value related to the column: ${prop.Column}
* @param ${prop.VarName} the ${prop.Column} value
*/
public void ${prop.SetterName} (${prop.AbsoluteSignatureClassName} ${prop.VarName}) {
this.${prop.VarName} = ${prop.VarName};
this.hashCode = Integer.MIN_VALUE;
}
#foreach ($entry in $prop.CustomProperties.entrySet())
/**
* Custom property
*/
public static String get${prop.VarName}${entry.Key} () {
return "${entry.Value}";
}
#end
#end
#end
#end
#end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -