javax.persistence.Version.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(111)

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

Version.<init>介绍

暂无

代码示例

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

@Version
public int getVersion() {
  return version;
}

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

@Version
public Integer getVersion() {
  return version;
}

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

@Version
public Integer getVersion() {
  return version;
}

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

@Version
public Integer getVersion() {
  return version;
}

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

@Version
public LocalDateTime getTs() {
  return ts;
}

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

@Version
public OffsetDateTime getTs() {
  return ts;
}

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

@Version
@Column(name = "ver")
public Integer getVersion() {
  return version;
}

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

@Version
@Column(name = "ver")
public Integer getVersion() {
  return version;
}

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

@Version
@Column(name = "OPTLOCK")
public Integer getVersion() {
  return version;
}

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

@Version
@Column(nullable = false)
public Long getVersion() {
  return version;
}

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

@Entity(name = "Person")
  public static class Person {

    @Id
    private Long id;

    private String name;

    @Version
    private long version;
  }
}

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

@MappedSuperclass
private static class Person {
  @Id
  String name;
  @Version
  Long oca;
  Person(String name) {
    this.name = name;
  }
  Person() {
  }
  void setOca(long l) {
    this.oca = l;
  }
}

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

@Entity
private static abstract class Person {
  @Id
  String name;
  @Version
  long oca;
  Person() {
  }
  Person(String name) {
    this();
    this.name = name;
  }
  void setOca(long l) {
    this.oca = l;
  }
}

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

@Entity( name = "thing" )
  @Table( name = "THING_ENTITY" )
  public class Thing {

    @Id
    @GeneratedValue( strategy = GenerationType.AUTO )
    long id;

    @Version
    long version;

    @Column( updatable = false )
    String special;
  }
}

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

@Entity(name = "Person")
@Inheritance(strategy = InheritanceType.JOINED)
public static class Person {
  @Id
  @Column(name = "PERSON_ID")
  private Long id;
  @Version
  @Column(name = "ver")
  private Integer version;
  private String name;
  public Person() {
  }
  public Person(Long id, String name) {
    this.id = id;
    this.name = name;
  }
}

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

@Entity(name = "Data")
public static class Data {
  @Id
  private String id;
  @Version
  private Integer version;
  public String getId() {
    return id;
  }
  public void setId(String id) {
    this.id = id;
  }
  @ElementCollection(fetch = FetchType.LAZY)
  @MapKeyColumn(name = "key")
  private Map<String, GenericStringList> stringlist = new TreeMap<>();
}

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

/**
 * @author Hardy Ferentschik
 */
@Entity
public class VMTimestamped {
  @Id
  @GeneratedValue
  private int id;

  @Version
  @Source
  private Date lastUpdate;

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public Date getLastUpdate() {
    return lastUpdate;
  }

  public void setLastUpdate(Date lastUpdate) {
    this.lastUpdate = lastUpdate;
  }
}

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

public long oid;
@Version
private int version;

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

@Entity( name = "VersionedPerson" )
  @Table( name = "versioned_persons" )
  @Cacheable()
  @SecondaryTable( name = "crm_persons2" )
  public static class VersionedPerson {
    @Id
    public String id;
    public String name;

    @Version public int version;

    @Column( table = "crm_persons2" )
    public boolean crmMarketingSchpele;

    public VersionedPerson() {
    }

    public VersionedPerson(String id, String name, boolean crmMarketingSchpele) {
      this.id = id;
      this.name = name;
    }
  }
}

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

/**
 * @author Emmanuel Bernard
 */
@Entity
@Table(name = "matchtable", schema = "matchschema")
@SecondaryTable(name = "extendedMatch")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@NamedQueries({
@NamedQuery(name = "matchbyid", query = "select m from Match m where m.id = :id"),
@NamedQuery(name = "getAllMatches2", query = "select m from Match m")
    })
@NamedNativeQueries({
@NamedNativeQuery(name = "matchbyid", query = "select m from Match m where m.id = :id", resultSetMapping = "matchrs"),
@NamedNativeQuery(name = "getAllMatches2", query = "select m from Match m", resultSetMapping = "matchrs")
    })
public class Match extends Competition {
  public String competitor1Point;
  @Version
  public Integer version;
  public SocialSecurityNumber playerASSN;
}

相关文章

Version类方法