當前位置: 首頁>>代碼示例>>Java>>正文


Java GenericGenerator類代碼示例

本文整理匯總了Java中org.hibernate.annotations.GenericGenerator的典型用法代碼示例。如果您正苦於以下問題:Java GenericGenerator類的具體用法?Java GenericGenerator怎麽用?Java GenericGenerator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GenericGenerator類屬於org.hibernate.annotations包,在下文中一共展示了GenericGenerator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPid

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
@Column(name="PID",length=15)
@Type(type="int")
@GenericGenerator(name="gen",strategy="increment")
@GeneratedValue(generator="gen")
	public int getPid() {
		return pid;
	}
 
開發者ID:pratikdimble,項目名稱:Hibernate_Component_Mapping_Using_DAO_Using_Maven,代碼行數:9,代碼來源:person.java

示例2: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
/** full constructor */

	// Property accessors
	@GenericGenerator( name = "generator" , strategy = "identity" )
	@Id
	@GeneratedValue( generator = "generator" )
	@Column( name = "id" , unique = true , nullable = false )
	public Integer getId() {
		return this.id;
	}
 
開發者ID:aiyoyoyo,項目名稱:jeesupport,代碼行數:11,代碼來源:TabB.java

示例3: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
@Column(length = 32)
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")	
public String getId() {
	return id;
}
 
開發者ID:uckefu,項目名稱:uckefu,代碼行數:8,代碼來源:TopicView.java

示例4: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
/**
    * 默認使用36位uuid作為主鍵
    *
    * @return id
    */
@Id
@Column(length = 36, nullable = true)
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
public String getId() {
	return id;
}
 
開發者ID:xiaolongzuo,項目名稱:niubi-job,代碼行數:13,代碼來源:AbstractEntity.java

示例5: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的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;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-MVC-Blueprints,代碼行數:8,代碼來源:Login.java

示例6: bindGenericGenerators

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
private static void bindGenericGenerators(XAnnotatedElement annotatedElement, Mappings mappings) {
	GenericGenerator defAnn = annotatedElement.getAnnotation( GenericGenerator.class );
	GenericGenerators defsAnn = annotatedElement.getAnnotation( GenericGenerators.class );
	if ( defAnn != null ) {
		bindGenericGenerator( defAnn, mappings );
	}
	if ( defsAnn != null ) {
		for ( GenericGenerator def : defsAnn.value() ) {
			bindGenericGenerator( def, mappings );
		}
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:13,代碼來源:AnnotationBinder.java

示例7: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
/**
 * @return the id
 */
@Id
@Column(length = 32)
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")	
public String getId() {
	return id;
}
 
開發者ID:uckefu,項目名稱:uckefu,代碼行數:11,代碼來源:Topic.java

示例8: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
@Column(length = 32, nullable = true)
@GenericGenerator(name = "sys_uuid", strategy = "uuid")
@GeneratedValue(generator = "sys_uuid")
public String getId() {
	return id;
}
 
開發者ID:xujeff,項目名稱:tianti,代碼行數:8,代碼來源:MysqlSequenceIdEntity.java

示例9: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
@GenericGenerator(name="generator",strategy="assigned")
@GeneratedValue(generator="generator")
@Column(length=32)
public String getId() {
	return id;
}
 
開發者ID:battlesteed,項目名稱:hibernateMaster,代碼行數:8,代碼來源:UUIDDomain.java

示例10: getName

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
@GenericGenerator(name="generator",strategy="assigned")
@GeneratedValue(generator="generator")
@Column(length=32)
public String getName() {
	return name;
}
 
開發者ID:battlesteed,項目名稱:hibernateMaster,代碼行數:8,代碼來源:Power.java

示例11: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
@Column(name = "id", unique = true, updatable = false, nullable = false)
@Override
public UUID getId() {
    return id;
}
 
開發者ID:Logicify,項目名稱:d2g-api,代碼行數:9,代碼來源:BaseIdentifiable.java

示例12: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Id
//	@GeneratedValue(strategy = GenerationType.AUTO)
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(length = 55)
	public String getId() {
		return id;
	}
 
開發者ID:wkeyuan,項目名稱:DWSurvey,代碼行數:9,代碼來源:IdEntity.java

示例13: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@GenericGenerator ( name = "generator" , strategy = "identity" )
@Id
@GeneratedValue ( generator = "generator" )

@Column ( name = "id" , unique = true , nullable = false )

public Integer getId() {
	return this.id;
}
 
開發者ID:aiyoyoyo,項目名稱:jeesupport,代碼行數:10,代碼來源:TabA.java

示例14: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的package包/類
@Jsonable
@Column(name = ID)
@Id
@GeneratedValue(generator = UUID)
@GenericGenerator(name = UUID, strategy = UUID)
@Override
public String getId() {
    return id;
}
 
開發者ID:heisedebaise,項目名稱:tephra,代碼行數:10,代碼來源:ModelSupport.java

示例15: getId

import org.hibernate.annotations.GenericGenerator; //導入依賴的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;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-MVC-Blueprints,代碼行數:8,代碼來源:Login.java


注:本文中的org.hibernate.annotations.GenericGenerator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。