本文整理了Java中javax.persistence.JoinTable.<init>()
方法的一些代码示例,展示了JoinTable.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JoinTable.<init>()
方法的具体详情如下:
包路径:javax.persistence.JoinTable
类名称:JoinTable
方法名:<init>
暂无
代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server
/**
* @return the claimsRequired
*/
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(
name = "claim_to_policy",
joinColumns = @JoinColumn(name = "policy_id"),
inverseJoinColumns = @JoinColumn(name = "claim_id")
)
public Collection<Claim> getClaimsRequired() {
return claimsRequired;
}
代码示例来源:origin: spring-projects/spring-petclinic
@Entity
@Table(name = "vets")
public class Vet extends Person {
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "vet_specialties", joinColumns = @JoinColumn(name = "vet_id"), inverseJoinColumns = @JoinColumn(name = "specialty_id"))
private Set<Specialty> specialties;
代码示例来源:origin: hibernate/hibernate-orm
@ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
@JoinTable(
name = "StoreSupplier",
joinColumns = @JoinColumn(name = "store"),
inverseJoinColumns = @JoinColumn(name = "supplier")
)
public Set<Supplier> getSuppliers() {
return suppliers;
}
代码示例来源:origin: hibernate/hibernate-orm
@Entity
public class Address {
@Id
private long id;
@ManyToOne
@JoinTable(name = "person_address")
private Person person;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Person getPerson() {
return person;
}
public void setPerson(Person person) {
this.person = person;
}
}
代码示例来源:origin: hibernate/hibernate-orm
public class DefaultTrackingModifiedEntitiesRevisionEntity extends DefaultRevisionEntity {
@ElementCollection(fetch = FetchType.EAGER)
@JoinTable(name = "REVCHANGES", joinColumns = @JoinColumn(name = "REV"))
@Column(name = "ENTITYNAME")
@Fetch(FetchMode.JOIN)
@ModifiedEntityNames
代码示例来源:origin: hibernate/hibernate-orm
@ManyToMany( cascade = CascadeType.ALL )
@JoinTable( name = "CHARACTER_ALIAS", indexes = @Index( columnList = "characters_id"))
// @JoinTable(
// name = "CHARACTER_ALIAS",
// joinColumns = @JoinColumn(name="ALIAS_ID", referencedColumnName="ID"),
// inverseJoinColumns = @JoinColumn(name="CHARACTER_ID", referencedColumnName="ID")
// )
public List<Character> getCharacters() {
return characters;
}
代码示例来源:origin: hibernate/hibernate-orm
@Entity(name = "TestEntity1")
@Table(name = "TestEntity1", catalog = "hibernate_orm_test_collation", schema = "dbo")
public static class TestEntity {
@Id
@Column(name = "`Id`")
long id;
String field1;
@ManyToMany
@JoinTable(catalog = "hibernate_orm_test_collation", schema = "dbo")
Set<LowercaseTableNameEntity> entities;
@OneToMany
@JoinColumn
private Set<UppercaseTableNameEntity> entitie2s;
@ManyToOne
private LowercaseTableNameEntity entity;
}
代码示例来源:origin: hibernate/hibernate-orm
@Entity
public class Attrset {
@Id
@GeneratedValue
private Long id;
@OneToMany
@JoinTable(name = "ATTRSET_X_ATTRVALUE")
private Set<Attrvalue> attrvalues = new HashSet<Attrvalue>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Set<Attrvalue> getAttrvalues() {
return attrvalues;
}
public void setAttrvalues(Set<Attrvalue> attrvalues) {
this.attrvalues = attrvalues;
}
}
代码示例来源:origin: hibernate/hibernate-orm
public class SequenceIdTrackingModifiedEntitiesRevisionEntity extends SequenceIdRevisionEntity {
@ElementCollection(fetch = FetchType.EAGER)
@JoinTable(name = "REVCHANGES", joinColumns = @JoinColumn(name = "REV"))
@Column(name = "ENTITYNAME")
@Fetch(FetchMode.JOIN)
@ModifiedEntityNames
代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server
/**
* @return the claimsSupplied
*/
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(
name = "claim_to_permission_ticket",
joinColumns = @JoinColumn(name = "permission_ticket_id"),
inverseJoinColumns = @JoinColumn(name = "claim_id")
)
public Collection<Claim> getClaimsSupplied() {
return claimsSupplied;
}
代码示例来源:origin: hibernate/hibernate-orm
@ManyToMany(
cascade = {CascadeType.PERSIST, CascadeType.MERGE}
)
@JoinTable(
name = "FRIEND2FRIEND",
joinColumns = {@JoinColumn(name = "FROM_FR", nullable = false)},
inverseJoinColumns = {@JoinColumn(name = "TO_FR", nullable = false)}
)
public Set<Friend> getFriends() {
return friends;
}
代码示例来源:origin: szerhusenBC/jwt-spring-security-demo
@Entity
@Table(name = "USER")
public class User {
@Id
@Column(name = "ID")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "user_seq")
@SequenceGenerator(name = "user_seq", sequenceName = "user_seq", allocationSize = 1)
private Long id;
@Column(name = "USERNAME", length = 50, unique = true)
@NotNull
@Size(min = 4, max = 50)
private String username;
@Column(name = "PASSWORD", length = 100)
@NotNull
@Size(min = 4, max = 100)
private Date lastPasswordResetDate;
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(
name = "USER_AUTHORITY",
joinColumns = {@JoinColumn(name = "USER_ID", referencedColumnName = "ID")},
inverseJoinColumns = {@JoinColumn(name = "AUTHORITY_ID", referencedColumnName = "ID")})
private List<Authority> authorities;
代码示例来源:origin: hibernate/hibernate-orm
@Embeddable
public static class ContactInformation implements Serializable {
@Column(name = "name")
String name;
@JoinTable(
name = "CONTACT_TYPE",
joinColumns = @JoinColumn(name = "id"),
inverseJoinColumns = @JoinColumn(name = "id")
代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server
/**
* @return the permissions
*/
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinTable(
name = "access_token_permissions",
joinColumns = @JoinColumn(name = "access_token_id"),
inverseJoinColumns = @JoinColumn(name = "permission_id")
)
public Set<Permission> getPermissions() {
return permissions;
}
代码示例来源:origin: hibernate/hibernate-orm
@ManyToMany
@JoinTable(joinColumns = @JoinColumn(referencedColumnName = "address"),
inverseJoinColumns = @JoinColumn(referencedColumnName = "name")
)
public Set<Inhabitant> getHasInhabitants() {
return hasInhabitants;
}
代码示例来源:origin: hibernate/hibernate-orm
@Entity
@Table(name = "EMPLOYEE")
public class Employee {
@Id
@GeneratedValue
private Long id;
@ManyToMany
@JoinTable(name = "EMPLOYEE_PROJECT",
joinColumns = @JoinColumn(name = "EMPLOYEE_ID", foreignKey = @ForeignKey(name = "FK_EMPLOYEE")),
inverseJoinColumns = @JoinColumn(name = "PROJECT_ID", foreignKey = @ForeignKey(name = "FK_PROJECT")))
private Set<Project> projects;
}
代码示例来源:origin: hibernate/hibernate-orm
@ManyToAny(
metaColumn = @Column( name = "property_type" ) )
@AnyMetaDef( idType = "integer", metaType = "string",
metaValues = {
@MetaValue( value = "S", targetEntity = StringProperty.class ),
@MetaValue( value = "I", targetEntity = IntegerProperty.class ) } )
@Cascade( { org.hibernate.annotations.CascadeType.ALL } )
@JoinTable( name = "obj_properties", joinColumns = @JoinColumn( name = "obj_id" ),
inverseJoinColumns = @JoinColumn( name = "property_id" ) )
public List<Property> getGeneralProperties() {
return generalProperties;
}
代码示例来源:origin: hibernate/hibernate-orm
@ElementCollection
// HHH-7732 -- "EntityWithAnElementCollection_someStrings" is too long for Oracle.
@JoinTable(
name = "SomeStrings",
joinColumns = @JoinColumn( name = "EWAEC_ID") )
public Set<String> getSomeStrings() {
return someStrings;
}
代码示例来源:origin: hibernate/hibernate-orm
@ManyToMany
@JoinTable(
name = "map_key_map_value",
joinColumns = @JoinColumn(name = "map_holder_id", nullable = false),
inverseJoinColumns = @JoinColumn(name = "map_value_id", nullable = false)
)
@MapKeyJoinColumn(name = "map_key_id", nullable = false)
public Map<MapKey, MapValue> getMap() {
return map;
}
代码示例来源:origin: hibernate/hibernate-orm
@Entity(name = "Person")
public static class Person {
@Id
@GeneratedValue
private Long id;
@Column(name = "`name`")
private String name;
@ElementCollection
@JoinTable(name = "person_phone", joinColumns = @JoinColumn(name = "person_id"))
private List<Phone> phones = new ArrayList<>();
public Person() {
}
public Person(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public String getName() {
return name;
}
public List<Phone> getPhones() {
return phones;
}
}
内容来源于网络,如有侵权,请联系作者删除!