本文整理匯總了Java中org.hibernate.annotations.Parameter類的典型用法代碼示例。如果您正苦於以下問題:Java Parameter類的具體用法?Java Parameter怎麽用?Java Parameter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Parameter類屬於org.hibernate.annotations包,在下文中一共展示了Parameter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "user"))
@Id
@GeneratedValue(generator = "generator")
@Column(name = "id", unique = true, nullable = false)
public int getId() {
return this.id;
}
示例2: bindTypeDef
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
private static void bindTypeDef(TypeDef defAnn, Mappings mappings) {
Properties params = new Properties();
for ( Parameter param : defAnn.parameters() ) {
params.setProperty( param.name(), param.value() );
}
if ( BinderHelper.isEmptyAnnotationValue( defAnn.name() ) && defAnn.defaultForType().equals( void.class ) ) {
throw new AnnotationException(
"Either name or defaultForType (or both) attribute should be set in TypeDef having typeClass " +
defAnn.typeClass().getName()
);
}
final String typeBindMessageF = "Binding type definition: %s";
if ( !BinderHelper.isEmptyAnnotationValue( defAnn.name() ) ) {
if ( LOG.isDebugEnabled() ) {
LOG.debugf( typeBindMessageF, defAnn.name() );
}
mappings.addTypeDef( defAnn.name(), defAnn.typeClass().getName(), params );
}
if ( !defAnn.defaultForType().equals( void.class ) ) {
if ( LOG.isDebugEnabled() ) {
LOG.debugf( typeBindMessageF, defAnn.defaultForType().getName() );
}
mappings.addTypeDef( defAnn.defaultForType().getName(), defAnn.typeClass().getName(), params );
}
}
示例3: setExplicitType
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
public void setExplicitType(Type typeAnn) {
if ( typeAnn != null ) {
explicitType = typeAnn.type();
typeParameters.clear();
for ( Parameter param : typeAnn.parameters() ) {
typeParameters.setProperty( param.name(), param.value() );
}
}
}
示例4: getId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "customerAccount"))
@Id
@GeneratedValue(generator = "generator")
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
return this.id;
}
示例5: getId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "invoice"))
@Id
@GeneratedValue(generator = "generator")
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
return this.id;
}
示例6: getStudentId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "tblstudents"))
@Id
@GeneratedValue(generator = "generator")
@Column(name = "studentID", unique = true, nullable = false)
public int getStudentId() {
return this.studentId;
}
示例7: getId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "customerInfo"))
@Id
@GeneratedValue(generator = "generator")
@Column(name = "id", unique = true, nullable = false)
public int getId() {
return this.id;
}
示例8: getId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Id
@Column(name = "ID", unique = true, nullable = false, length = 19)
@GeneratedValue(strategy = GenerationType.TABLE, generator = "table")
@GenericGenerator(name = "table", strategy = "org.hibernate.id.MultipleHiLoPerTableGenerator", parameters = {
@Parameter(name = "max_lo", value = "5") })//增長級別為5,可根據並發級別適當調整
public Long getId() {
return this.id;
}
示例9: getUserId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "user"))
@Id
@GeneratedValue(generator = "generator")
@Column(name = "user_id", unique = true, nullable = false)
public int getUserId() {
return this.userId;
}
示例10: getGpa
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Column(name = "gpa")
@Type(type = "com.eclecticlogic.pedal.provider.hibernate.ListType", parameters = {
@Parameter(name = ArrayType.DIALECT_PRIMITIVE_NAME, value = PostgresqlArrayPrimitiveName.LONG),
@Parameter(name = ArrayType.EMPTY_IS_NULL, value = "false") })
public List<Long> getGpa() {
return gpa;
}
示例11: getCapitals
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Column(name = "capitals")
@Type(type = "com.eclecticlogic.pedal.provider.hibernate.ListType", parameters = {
@Parameter(name = ArrayType.DIALECT_PRIMITIVE_NAME, value = PostgresqlArrayPrimitiveName.STRING)})
@CopyEmptyAsNull
public List<String> getCapitals() {
return capitals;
}
示例12: getExecuterInformationData
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Column(name = "EXECUTER_INFORMATION_DATA", length = Integer.MAX_VALUE)
@Cascade(CascadeType.ALL)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @org.hibernate.annotations.Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
@OnDelete(action = OnDeleteAction.CASCADE)
public ExecuterInformationData getExecuterInformationData() {
return executerInformationData;
}
示例13: getAddress
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Column(name = "address", columnDefinition = "TEXT")
@Type(type = "com.yahoo.elide.datastores.hibernate3.usertypes.JsonType", parameters = {
@Parameter(name = "class", value = "example.AddressFragment")
})
public AddressFragment getAddress() {
return address;
}
示例14: getAddress
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Column(name = "address", columnDefinition = "TEXT")
@Type(type = "com.yahoo.elide.datastores.hibernate5.usertypes.JsonType", parameters = {
@Parameter(name = "class", value = "example.AddressFragment")
})
public AddressFragment getAddress() {
return address;
}
示例15: getId
import org.hibernate.annotations.Parameter; //導入依賴的package包/類
@Override
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "ancestrySequenceGenerator")
@GenericGenerator(name = "ancestrySequenceGenerator", strategy = "jeffaschenk.commons.touchpoint.model.dao.support.hibernate.PlatformSequenceGenerator",
parameters = {@Parameter(name = "sequence", value = "ancestries_seq_id")})
public Integer getId() {
return super.getId();
}