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

x33g5p2x  于2022-01-29 转载在 其他  
字(13.6k)|赞(0)|评价(0)|浏览(171)

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

Transient.<init>介绍

暂无

代码示例

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name = "ZONE", schema=SchemaConstant.SALESMANAGER_SCHEMA)
public class Zone extends SalesManagerEntity<Long, Zone>{
  private static final long serialVersionUID = 1L;
  @Id
  @Column(name="ZONE_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT",
  pkColumnValue = "ZONE_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  private Country country;
  @Transient
  private String name;
  @Column(name = "ZONE_CODE", unique=true, nullable = false)
  private String code;

代码示例来源:origin: shopizer-ecommerce/shopizer

@Embeddable
public class Delivery {
  @Column (name ="DELIVERY_LAST_NAME", length=64)
  private String lastName;
  @Column (name ="DELIVERY_FIRST_NAME", length=64)
  private String firstName;
  @Column (name ="DELIVERY_COMPANY", length=100)
  private String company;
  private Zone zone;
  @Transient
  private String latitude = null;
  @Transient
  private String longitude = null;

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

@Entity
@EntityListeners( LastUpdateListener.class )
public static class Person {
  @Id
  private Long id;
  private String name;
  private Date dateOfBirth;
  @Transient
  private long age;
  private Date lastUpdate;
  public void setLastUpdate(Date lastUpdate) {
    this.lastUpdate = lastUpdate;
  }
  /**
   * Set the transient property at load time based on a calculation.
   * Note that a native Hibernate formula mapping is better for this purpose.
   */
  @PostLoad
  public void calculateAge() {
    age = ChronoUnit.YEARS.between( LocalDateTime.ofInstant(
        Instant.ofEpochMilli( dateOfBirth.getTime()), ZoneOffset.UTC),
      LocalDateTime.now()
    );
  }
}

代码示例来源:origin: Exrick/x-boot

/**
 * @author Exrickx
 */
@Data
@Entity
@Table(name = "t_user_role")
@TableName("t_user_role")
@ApiModel(value = "用户角色")
public class UserRole extends XbootBaseEntity {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "用户唯一id")
  private String userId;

  @ApiModelProperty(value = "角色唯一id")
  private String roleId;

  @Transient
  @TableField(exist=false)
  @ApiModelProperty(value = "角色名")
  private String roleName;
}

代码示例来源:origin: shopizer-ecommerce/shopizer

private ShoppingCart shoppingCart;
@Column(name="QUANTITY")
private Integer quantity = new Integer(1);
private AuditSection auditSection = new AuditSection();
@Transient
private boolean productVirtual;
private Set<ShoppingCartAttributeItem> attributes = new HashSet<ShoppingCartAttributeItem>();
@Transient
private BigDecimal itemPrice;//item final price including all rebates
@Transient
private BigDecimal subTotal;//item final price * quantity
@Transient
private FinalPrice finalPrice;//contains price details (raw prices)
@Transient
private Product product;
@Transient
private boolean obsolete = false;

代码示例来源:origin: zstackio/zstack

@Entity
@Table
@EO(EOClazz = DiskOfferingEO.class)
@BaseResource
public class DiskOfferingVO extends DiskOfferingAO implements OwnedByAccount {
  @Transient
  private String accountUuid;

  @Override
  public String getAccountUuid() {
    return accountUuid;
  }

  @Override
  public void setAccountUuid(String accountUuid) {
    this.accountUuid = accountUuid;
  }

}

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

@Entity(name = "MyEnhancedReferenceData")
@Immutable
@Cacheable
@SuppressWarnings("UnusedDeclaration")
public static class MyEnhancedReferenceData implements ManagedEntity {
  @Id
  private Integer id;
  private String name;
  private String theValue;
  @Transient
  private transient EntityEntry entityEntry;
  @Transient
  private transient ManagedEntity previous;
  @Transient
  private transient ManagedEntity next;

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name = "PRODUCT_IMAGE", schema=SchemaConstant.SALESMANAGER_SCHEMA)
public class ProductImage extends SalesManagerEntity<Long, ProductImage> {
  private static final long serialVersionUID = 247514890386076337L;
  @Id
  @Column(name = "PRODUCT_IMAGE_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "PRODUCT_IMG_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name = "PRODUCT_IMAGE")
  private String productImage;
  @Column(name = "DEFAULT_IMAGE")
  private boolean defaultImage = true;
  private Product product;
  @Transient
  private InputStream image = null;

代码示例来源:origin: Exrick/x-boot

@Entity
@Table(name = "t_role")
@TableName("t_role")
@ApiModel(value = "角色")
  private String description;
  @Transient
  @TableField(exist=false)
  @ApiModelProperty(value = "拥有权限")
  private List<RolePermission> permissions;
  @Transient
  @TableField(exist=false)
  @ApiModelProperty(value = "拥有数据权限")

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name="PRODUCT_OPTION_VALUE", schema=SchemaConstant.SALESMANAGER_SCHEMA, indexes = { @Index(name="PRD_OPTION_VAL_CODE_IDX", columnList = "PRODUCT_OPTION_VAL_CODE")}, uniqueConstraints=
  @UniqueConstraint(columnNames = {"MERCHANT_ID", "PRODUCT_OPTION_VAL_CODE"}))
public class ProductOptionValue extends SalesManagerEntity<Long, ProductOptionValue> {
  private static final long serialVersionUID = 3736085877929910891L;
  @Id
  @Column(name="PRODUCT_OPTION_VALUE_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "PRODUCT_OPT_VAL_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name="PRODUCT_OPT_VAL_SORT_ORD")
  private Integer productOptionValueSortOrder;
  @Column(name="PRODUCT_OPT_VAL_IMAGE")
  private String productOptionValueImage;
  private Set<ProductOptionValueDescription> descriptions = new HashSet<ProductOptionValueDescription>();
  @Transient
  private MultipartFile image = null;
  @Transient
  private List<ProductOptionValueDescription> descriptionsList = new ArrayList<ProductOptionValueDescription>();

代码示例来源:origin: zstackio/zstack

@Entity
@Table
@EO(EOClazz = InstanceOfferingEO.class)
@BaseResource
public class InstanceOfferingVO extends InstanceOfferingAO implements OwnedByAccount {
  @Transient
  private String accountUuid;

  @Override
  public String getAccountUuid() {
    return accountUuid;
  }

  @Override
  public void setAccountUuid(String accountUuid) {
    this.accountUuid = accountUuid;
  }

  public InstanceOfferingVO() {
  }

  public InstanceOfferingVO(InstanceOfferingVO other) {
    super(other);
  }
}

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

/**
 * @author Emmanuel Bernard
 */
@Entity
@Table(name = "tbl_sky",
    uniqueConstraints = {@UniqueConstraint(columnNames = {"`month`", "`day`"})}
)
public class Sky implements Serializable {
  @Id
  protected Long id;
  @Column(unique = true, columnDefinition = "varchar(250)", nullable = false)
  protected String color;
  @Column(name="`day`",nullable = false)
  protected String day;
  @Column(name = "`month`", nullable = false)
  protected String month;
  @Transient
  protected String area;
}

代码示例来源:origin: zstackio/zstack

@Entity
@Table
@EO(EOClazz = IpRangeEO.class)
@BaseResource
  @Transient
  private String accountUuid;

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name = "COUNTRY", schema=SchemaConstant.SALESMANAGER_SCHEMA)
@Cacheable
public class Country extends SalesManagerEntity<Integer, Country> {
  private static final long serialVersionUID = -7388011537255588035L;
  @Id
  @Column(name="COUNTRY_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT",
  pkColumnValue = "COUNTRY_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Integer id;
  private GeoZone geoZone;
  @Column(name = "COUNTRY_SUPPORTED")
  private boolean supported = true;
  @Column(name = "COUNTRY_ISOCODE", unique=true, nullable = false)
  private String isoCode;
  @Transient
  private String name;

代码示例来源:origin: zstackio/zstack

@Entity
@Table
@EO(EOClazz = VolumeEO.class)
@BaseResource
  @Transient
  private String accountUuid;

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name="CUSTOMER_OPTION_VALUE", schema=SchemaConstant.SALESMANAGER_SCHEMA, indexes = { @Index(name="CUST_OPT_VAL_CODE_IDX",columnList = "CUSTOMER_OPT_VAL_CODE")}, uniqueConstraints=
  @UniqueConstraint(columnNames = {"MERCHANT_ID", "CUSTOMER_OPT_VAL_CODE"}))
public class CustomerOptionValue extends SalesManagerEntity<Long, CustomerOptionValue> {
  private static final long serialVersionUID = 3736085877929910891L;
  @Id
  @Column(name="CUSTOMER_OPTION_VALUE_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "CUSTOMER_OPT_VAL_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name="SORT_ORDER")
  private Integer sortOrder = 0;
  @Column(name="CUSTOMER_OPT_VAL_IMAGE")
  private String customerOptionValueImage;
  private Set<CustomerOptionValueDescription> descriptions = new HashSet<CustomerOptionValueDescription>();
  @Transient
  private List<CustomerOptionValueDescription> descriptionsList = new ArrayList<CustomerOptionValueDescription>();

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name="PRODUCT_ATTRIBUTE", schema=SchemaConstant.SALESMANAGER_SCHEMA,
  uniqueConstraints={
    @UniqueConstraint(columnNames={
  private static final long serialVersionUID = -6537491946539803265L;
  @Id
  @Column(name = "PRODUCT_ATTRIBUTE_ID", unique=true, nullable=false)
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "PRODUCT_ATTR_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name="PRODUCT_ATRIBUTE_PRICE")
  private BigDecimal productAttributePrice;
  @Column(name="PRODUCT_ATTRIBUTE_SORT_ORD")
  private Integer productOptionSortOrder;
  @Transient
  private String attributePrice = "0";
  @Transient
  private String attributeSortOrder = "0";
  @Transient
  private String attributeAdditionalWeight = "0";

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name="PRODUCT_OPTION", schema=SchemaConstant.SALESMANAGER_SCHEMA, indexes = { @Index(name="PRD_OPTION_CODE_IDX", columnList = "PRODUCT_OPTION_CODE")}, uniqueConstraints=
  @UniqueConstraint(columnNames = {"MERCHANT_ID", "PRODUCT_OPTION_CODE"}))
public class ProductOption extends SalesManagerEntity<Long, ProductOption> {
  private static final long serialVersionUID = -2019269055342226086L;
  @Id
  @Column(name="PRODUCT_OPTION_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "PRODUCT_OPTION_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name="PRODUCT_OPTION_SORT_ORD")
  private Integer productOptionSortOrder;
  @Column(name="PRODUCT_OPTION_TYPE", length=10)
  private String productOptionType;
  private Set<ProductOptionDescription> descriptions = new HashSet<ProductOptionDescription>();
  @Transient
  private List<ProductOptionDescription> descriptionsList = new ArrayList<ProductOptionDescription>();

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name="CUSTOMER_OPTION", schema=SchemaConstant.SALESMANAGER_SCHEMA, indexes = { @Index(name="CUST_OPT_CODE_IDX", columnList = "CUSTOMER_OPT_CODE")}, uniqueConstraints=
  @UniqueConstraint(columnNames = {"MERCHANT_ID", "CUSTOMER_OPT_CODE"}))
public class CustomerOption extends SalesManagerEntity<Long, CustomerOption> {
  private static final long serialVersionUID = -2019269055342226086L;
  @Id
  @Column(name="CUSTOMER_OPTION_ID")
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "CUSTOMER_OPTION_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name="SORT_ORDER")
  private Integer sortOrder = 0;
  @Column(name="CUSTOMER_OPTION_TYPE", length=10)
  private String customerOptionType;
  private Set<CustomerOptionDescription> descriptions = new HashSet<CustomerOptionDescription>();
  @Transient
  private List<CustomerOptionDescription> descriptionsList = new ArrayList<CustomerOptionDescription>();

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@EntityListeners(value = AuditListener.class)
@Table(name = "SHOPPING_CART_ATTR_ITEM", schema=SchemaConstant.SALESMANAGER_SCHEMA)
public class ShoppingCartAttributeItem extends SalesManagerEntity<Long, ShoppingCartAttributeItem> implements Auditable {
  @Id
  @Column(name = "SHP_CART_ATTR_ITEM_ID", unique=true, nullable=false)
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "SHP_CRT_ATTR_ITM_SEQ_NEXT_VAL")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  @Column(name="PRODUCT_ATTR_ID", nullable=false)
  private Long productAttributeId;
  @Transient
  private ProductAttribute productAttribute;

相关文章

Transient类方法