org.hibernate.annotations.Where.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(270)

本文整理了Java中org.hibernate.annotations.Where.<init>()方法的一些代码示例,展示了Where.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Where.<init>()方法的具体详情如下:
包路径:org.hibernate.annotations.Where
类名称:Where
方法名:<init>

Where.<init>介绍

暂无

代码示例

代码示例来源:origin: ctripcorp/apollo

@Entity
@Table(name = "NamespaceLock")
@Where(clause = "isDeleted = 0")
public class NamespaceLock extends BaseEntity{

 @Column(name = "NamespaceId")
 private long namespaceId;

 public long getNamespaceId() {
  return namespaceId;
 }

 public void setNamespaceId(long namespaceId) {
  this.namespaceId = namespaceId;
 }
}

代码示例来源:origin: ctripcorp/apollo

/**
 * @author Jason Song(song_s@ctrip.com)
 */
@Entity
@Table(name = "Role")
@SQLDelete(sql = "Update Role set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class Role extends BaseEntity {
 @Column(name = "RoleName", nullable = false)
 private String roleName;

 public String getRoleName() {
  return roleName;
 }

 public void setRoleName(String roleName) {
  this.roleName = roleName;
 }
}

代码示例来源:origin: ctripcorp/apollo

@Table(name = "Permission")
@SQLDelete(sql = "Update Permission set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class Permission extends BaseEntity {
 @Column(name = "PermissionType", nullable = false)

代码示例来源:origin: ctripcorp/apollo

@Table(name = "UserRole")
@SQLDelete(sql = "Update UserRole set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class UserRole extends BaseEntity {
 @Column(name = "UserId", nullable = false)

代码示例来源:origin: ctripcorp/apollo

@Table(name = "RolePermission")
@SQLDelete(sql = "Update RolePermission set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class RolePermission extends BaseEntity {
 @Column(name = "RoleId", nullable = false)

代码示例来源:origin: ctripcorp/apollo

@Entity
@Table(name = "Favorite")
@SQLDelete(sql = "Update Favorite set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class Favorite extends BaseEntity {

代码示例来源:origin: ctripcorp/apollo

@Table(name = "ConsumerRole")
@SQLDelete(sql = "Update ConsumerRole set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class ConsumerRole extends BaseEntity {
 @Column(name = "ConsumerId", nullable = false)

代码示例来源:origin: ctripcorp/apollo

@Entity
@Table(name = "Privilege")
@SQLDelete(sql = "Update Privilege set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class Privilege extends BaseEntity {

代码示例来源:origin: hibernate/hibernate-orm

@Entity(name = "Category")
  @Table(name = "CATEGORY")
  @Where(clause = "inactive = 0")
  public static class Category {
    @Id
    private int id;

    private String name;

    private String description;

    private int inactive;
  }
}

代码示例来源:origin: hibernate/hibernate-orm

@Entity(name = "Category")
@Table(name = "CATEGORY")
@Where(clause = "inactive = 0")
public static class Category {
  @Id
  @GeneratedValue
  private int id;
  private String name;
  private int inactive;
}

代码示例来源:origin: hibernate/hibernate-orm

@Entity(name = "Category")
@Table(name = "CATEGORY")
@Where(clause = "inactive = 0")
public static class Category {
  @Id
  @GeneratedValue
  private int id;
  private String name;
  private int inactive;
}

代码示例来源:origin: hibernate/hibernate-orm

@OneToMany
@JoinColumn( name = "MATERIAL_OWNER_ID")
@Where( clause = "name = 'high' or name = 'medium'" )
@Immutable
public List<Rating> getMediumOrHighRatingsFromCombined() {
  return mediumOrHighRatingsFromCombined;
}
public void setMediumOrHighRatingsFromCombined(List<Rating> mediumOrHighRatingsFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ElementCollection
@CollectionTable(
    name = "COLLECTION_TABLE",
    joinColumns = { @JoinColumn( name = "MAIN_ID" ) }
)
@Column( name="VALUE")
@Where( clause = "MAIN_CODE='MATERIAL' AND VALUE_CODE='SIZE'")
@Immutable
public Set<String> getSizesFromCombined() {
  return sizesFromCombined;
}
public void setSizesFromCombined(Set<String> sizesFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ElementCollection
@CollectionTable(
    name = "COLLECTION_TABLE",
    joinColumns = { @JoinColumn( name = "MAIN_ID" ) }
)
@Column( name="VALUE")
@Where( clause = "MAIN_CODE='BUILDING' AND VALUE_CODE='RATING'" )
@Immutable
public Set<String> getRatingsFromCombined() {
  return ratingsFromCombined;
}
public void setRatingsFromCombined(Set<String> ratingsFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ElementCollection
@CollectionTable(
    name = "COLLECTION_TABLE",
    joinColumns = { @JoinColumn( name = "MAIN_ID" ) }
)
@Column( name="VALUE")
@Where( clause = "MAIN_CODE='BUILDING' AND VALUE_CODE='SIZE'")
@Immutable
public Set<String> getSizesFromCombined() {
  return sizesFromCombined;
}
public void setSizesFromCombined(Set<String> sizesFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ElementCollection
@CollectionTable(
    name = "COLLECTION_TABLE",
    joinColumns = { @JoinColumn( name = "MAIN_ID" ) }
)
@Where( clause = "MAIN_CODE='BUILDING' AND ASSOCIATION_CODE='SIZE'")
@Immutable
public Set<ContainedSize> getContainedSizesFromCombined() {
  return containedSizesFromCombined;
}
public void setContainedSizesFromCombined(Set<ContainedSize> containedSizesFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ElementCollection
@CollectionTable(
    name = "COLLECTION_TABLE",
    joinColumns = { @JoinColumn( name = "MAIN_ID" ) }
)
@Where( clause = "MAIN_CODE='BUILDING' AND ASSOCIATION_CODE='RATING'" )
@Immutable
public Set<ContainedRating> getContainedRatingsFromCombined() {
  return containedRatingsFromCombined;
}
public void setContainedRatingsFromCombined(Set<ContainedRating> containedRatingsFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ElementCollection
@CollectionTable(
    name = "COLLECTION_TABLE",
    joinColumns = { @JoinColumn( name = "MAIN_ID" ) }
)
@AssociationOverrides(
    value = { @AssociationOverride( name = "size", joinColumns = { @JoinColumn(name = "ASSOCIATION_ID") } ) }
)
@Where( clause = "MAIN_CODE='MATERIAL' AND ASSOCIATION_CODE='SIZE'")
@Immutable
public Set<ContainedSize> getContainedSizesFromCombined() {
  return containedSizesFromCombined;
}
public void setContainedSizesFromCombined(Set<ContainedSize> containedSizesFromCombined) {

代码示例来源:origin: hibernate/hibernate-orm

@ManyToMany(cascade = CascadeType.PERSIST)
@OrderBy("expirationDate")
@Where(clause = "1=1")
@WhereJoinTable(clause = "2=2")
@Filter(name="Groupfilter", condition = "3=3")
@FilterJoinTable(name="Groupfilter", condition = "4=4")
public Set<Permission> getPermissions() {
  return permissions;
}

代码示例来源:origin: hibernate/hibernate-orm

@ManyToMany(cascade = CascadeType.PERSIST)
@OrderBy("expirationDate")
@Where(clause = "1=1")
@WhereJoinTable(clause = "2=2")
@Filter(name="Groupfilter", condition = "3=3")
@FilterJoinTable(name="Groupfilter", condition = "4=4")
public Collection<Permission> getPermissions() {
  return permissions;
}

相关文章