@Id @Column(name="PID",length=15) @Type(type="int") @GenericGenerator(name="gen",strategy="increment") @GeneratedValue(generator="gen") public int getPid() { return pid; }
/** * Enums must be mapped as String, not ORDINAL. * @param g */ private void checkEnumMapping(Method g) { if(Enum.class.isAssignableFrom(g.getReturnType())) { // Is type enum? if(g.getAnnotation(Transient.class) != null) return; //-- If the enum has a @Type we will have to assume the type handles mapping correctly (like MappedEnumType) org.hibernate.annotations.Type ht = g.getAnnotation(Type.class); if(null == ht) { //-- No @Type mapping, so this must have proper @Enumerated definition. Enumerated e = g.getAnnotation(Enumerated.class); if(null == e) { problem(Severity.ERROR, "Missing @Enumerated annotation on enum property - this will cause ORDINAL mapping of an enum which is undesirable"); m_enumErrors++; } else if(e.value() != EnumType.STRING) { problem(Severity.ERROR, "@Enumerated(ORDINAL) annotation on enum property - this will cause ORDINAL mapping of an enum which is undesirable"); m_enumErrors++; } } } }
@Type(type = "org.openyu.commons.entity.usertype.NamesEntityUserType") @Column(name = "names", length = 2048) @Field(store = Store.YES, index = Index.YES, analyze = Analyze.NO) @FieldBridge(impl = NamesEntityBridge.class) public Set<LocaleNameEntity> getNames() { return names; }
private static boolean discoverTypeWithoutReflection(XProperty p) { if ( p.isAnnotationPresent( OneToOne.class ) && !p.getAnnotation( OneToOne.class ) .targetEntity() .equals( void.class ) ) { return true; } else if ( p.isAnnotationPresent( OneToMany.class ) && !p.getAnnotation( OneToMany.class ) .targetEntity() .equals( void.class ) ) { return true; } else if ( p.isAnnotationPresent( ManyToOne.class ) && !p.getAnnotation( ManyToOne.class ) .targetEntity() .equals( void.class ) ) { return true; } else if ( p.isAnnotationPresent( ManyToMany.class ) && !p.getAnnotation( ManyToMany.class ) .targetEntity() .equals( void.class ) ) { return true; } else if ( p.isAnnotationPresent( org.hibernate.annotations.Any.class ) ) { return true; } else if ( p.isAnnotationPresent( ManyToAny.class ) ) { if ( !p.isCollection() && !p.isArray() ) { throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() ); } return true; } else if ( p.isAnnotationPresent( Type.class ) ) { return true; } else if ( p.isAnnotationPresent( Target.class ) ) { return true; } return false; }
public void setExplicitType(Type typeAnn) { if ( typeAnn != null ) { explicitType = typeAnn.type(); typeParameters.clear(); for ( Parameter param : typeAnn.parameters() ) { typeParameters.setProperty( param.name(), param.value() ); } } }
@Column(length=15) @Type(type="string") @NotNull(message="Name is Required") @Size(min=4,max=10,message="Name Must be in 5 to 10 chars only") @Pattern(regexp="ps[A-Z]*",message="Name Must be Starts with ps") public String getName() { return name; }
@Override @Id @Type(type = "uuid-char") @Access(value = AccessType.PROPERTY) @Column(name = "file_metadata_uuid", nullable = false, updatable = false) public UUID getId() { return id; }
@Id @Type(type = "uuid-char") @Access(value = AccessType.PROPERTY) @Override public UUID getId() { return id; }
@Override @Type(type="text") @Column(unique=true) public String getLink() { return this.link; }
@Type(type="org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime") @Basic( optional = true ) @Column @ColumnTransformer( read="convert_from(dob_decrypt(dob),'UTF-8')", write="dob_encrypt(?)") public LocalDateTime getDob() { return this.dob; }
@Id @Basic( optional = false ) @Column( name = "id", nullable = false ) @org.hibernate.annotations.Type(type="org.hibernate.type.PostgresUUIDType") public java.util.UUID getId() { return this.id; }
@Lob @Column(nullable = false) @Type(type = "org.hibernate.type.MaterializedBlobType") @Override public byte[] getContent() { return super.getContent(); }
@Lob @Column @Type(type="org.hibernate.type.StringClobType") @Override public String getDocument() { return super.getDocument(); }
@Lob @Column @Type(type = "org.hibernate.type.StringClobType") @Override public String getSetup() { return super.getSetup(); }
@Lob @Column @Type(type = "org.hibernate.type.StringClobType") @Override public String getAction() { return super.getAction(); }
@Lob @Type(type = "org.hibernate.type.StringClobType") @Column @Override public String getExpected() { return super.getExpected(); }
@Lob @Column @Type(type = "org.hibernate.type.StringClobType") @Override public String getDescription() { return super.getDescription(); }
@Column(name = "gpa") @Type(type = "com.eclecticlogic.pedal.provider.hibernate.ListType", parameters = { @Parameter(name = ArrayType.DIALECT_PRIMITIVE_NAME, value = PostgresqlArrayPrimitiveName.LONG), @Parameter(name = ArrayType.EMPTY_IS_NULL, value = "false") }) public List<Long> getGpa() { return gpa; }
@Column(name = "capitals") @Type(type = "com.eclecticlogic.pedal.provider.hibernate.ListType", parameters = { @Parameter(name = ArrayType.DIALECT_PRIMITIVE_NAME, value = PostgresqlArrayPrimitiveName.STRING)}) @CopyEmptyAsNull public List<String> getCapitals() { return capitals; }
@Column(name = "EXECUTER_INFORMATION_DATA", length = Integer.MAX_VALUE) @Cascade(CascadeType.ALL) @Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @org.hibernate.annotations.Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object")) @OnDelete(action = OnDeleteAction.CASCADE) public ExecuterInformationData getExecuterInformationData() { return executerInformationData; }
@Column(name = "address", columnDefinition = "TEXT") @Type(type = "com.yahoo.elide.datastores.hibernate3.usertypes.JsonType", parameters = { @Parameter(name = "class", value = "example.AddressFragment") }) public AddressFragment getAddress() { return address; }
@Column(name = "address", columnDefinition = "TEXT") @Type(type = "com.yahoo.elide.datastores.hibernate5.usertypes.JsonType", parameters = { @Parameter(name = "class", value = "example.AddressFragment") }) public AddressFragment getAddress() { return address; }
@Type(type = "org.openyu.commons.entity.usertype.NamesEntityUserType") @Column(name = "names", length = 2048) @Field(store = Store.YES, index = Index.YES, analyze = Analyze.NO) @FieldBridge(impl = NamesEntityBridge.class) public Set<LocaleNameEntity> getNames() { return names.getNames(); }
@Type(type = "org.openyu.commons.entity.usertype.AuditEntityUserType") @Column(name = "audit", length = 570) @Field(store = Store.YES, index = Index.YES, analyze = Analyze.NO) @FieldBridge(impl = AuditEntityBridge.class) public AuditEntity getAudit() { return audit; }
@Column(length=10,precision=2) @Type(type="float") public float getSal() { return sal; }
@Id @Column(length=10) @Type(type="int") public int getId() { return id; }
@Column(length=15) @Type(type="string") public String getName() { return name; }
@Column(length=15,precision=2) @Type(type="float") public float getSal() { return sal; }
@Type(type = "org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime") @CreatedDate public ZonedDateTime getPostDate() { return postDate; }