org.hibernate.annotations.Where类的使用及代码示例

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

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

Where介绍

暂无

代码示例

代码示例来源: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: hibernate/hibernate-orm

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}

代码示例来源: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: org.hibernate/hibernate-annotations

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}

代码示例来源: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: hibernate/hibernate-orm

Where whereOnClass = property.getElementClass().getAnnotation( Where.class );
  if ( whereOnClass != null ) {
    whereOnClassClause = whereOnClass.clause();
String whereOnCollectionClause = null;
if ( whereOnCollection != null ) {
  whereOnCollectionClause = whereOnCollection.clause();

代码示例来源: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: org.hibernate/com.springsource.org.hibernate.core

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}

代码示例来源: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: jboss.jboss-embeddable-ejb3/hibernate-all

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}

代码示例来源: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: org.hibernate.orm/hibernate-core

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}

代码示例来源: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: org.hibernate/com.springsource.org.hibernate

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}

代码示例来源: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: br.com.jarch/jarch-apt

private static void validWhereLogicExclusionManyToOne(ProcessingEnvironment processingEnv, Element element) {
  final Where anotacaoFilter = element.getAnnotation(Where.class);
  if (anotacaoFilter != null && JpaUtils.WHERE_LOGIC_EXCLUSION.equals(anotacaoFilter.clause())) {
    processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "JARCH ERROR: Exclusão lógica não pode conter @ManyToOne, se for um mapeamento BI-DIRECIONAL remova esse mapeamento tornando UNI-DIRECIONAL ou transforme em exclusão física", element);
  }
}

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

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

代码示例来源:origin: br.com.jarch/jarch-utils

public static boolean isExclusionLogic(Class<?> clazzEntity) {
  Where whereAnnotation = clazzEntity.getAnnotation(Where.class);
  if ((whereAnnotation != null && (whereAnnotation.clause().equals(WHERE_LOGIC_EXCLUSION)))) {
    return true;
  }
  return Arrays
      .stream(clazzEntity.getAnnotationsByType(Filter.class))
      .anyMatch(a -> a.name().equals(LOGIC_EXCLUSION) && a.condition().equals(WHERE_LOGIC_EXCLUSION));
}

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

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

代码示例来源:origin: br.com.jarch/jarch-util

public static boolean isExclusionLogic(Class<?> clazzEntity) {
  Where whereAnnotation = clazzEntity.getAnnotation(Where.class);
  if ((whereAnnotation != null && (whereAnnotation.clause().equals(WHERE_LOGIC_EXCLUSION)))) {
    return true;
  }
  return Arrays
      .stream(clazzEntity.getAnnotationsByType(Filter.class))
      .anyMatch(a -> a.name().equals(LOGIC_EXCLUSION) && a.condition().equals(WHERE_LOGIC_EXCLUSION));
}

相关文章