Java 类org.hibernate.annotations.Type 实例源码

项目:Hibernate_Component_Mapping_Using_DAO_Using_Maven    文件:person.java   
@Id
@Column(name="PID",length=15)
@Type(type="int")
@GenericGenerator(name="gen",strategy="increment")
@GeneratedValue(generator="gen")
    public int getPid() {
        return pid;
    }
项目:domui    文件:HibernateChecker.java   
/**
 * 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++;
            }
        }
    }
}
项目:openyu-commons    文件:DogPoImpl.java   
@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;
}
项目:lams    文件:PropertyContainer.java   
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;
}
项目:lams    文件:SimpleValueBinder.java   
public void setExplicitType(Type typeAnn) {
    if ( typeAnn != null ) {
        explicitType = typeAnn.type();
        typeParameters.clear();
        for ( Parameter param : typeAnn.parameters() ) {
            typeParameters.setProperty( param.name(), param.value() );
        }
    }
}
项目:Hibernate_Validation_API_Annotation_Simple    文件:Employee.java   
@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;
}
项目:oma-riista-web    文件:PersistentFileMetadata.java   
@Override
@Id
@Type(type = "uuid-char")
@Access(value = AccessType.PROPERTY)
@Column(name = "file_metadata_uuid", nullable = false, updatable = false)
public UUID getId() {
    return id;
}
项目:oma-riista-web    文件:PersistentFileContent.java   
@Id
@Type(type = "uuid-char")
@Access(value = AccessType.PROPERTY)
@Override
public UUID getId() {
    return id;
}
项目:NewsBotIRC    文件:DBEntry.java   
@Override
@Type(type="text")
@Column(unique=true)
public String getLink()
{
    return this.link;
}
项目:coordinated-entry    文件:Client.java   
@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;

}
项目:coordinated-entry    文件:Client.java   
@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;

}
项目:coordinated-entry    文件:ClientEntity.java   
@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;

}
项目:coordinated-entry    文件:ClientEntity.java   
@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;

}
项目:testcube-server    文件:PlanAttachment.java   
@Lob
@Column(nullable = false)
@Type(type = "org.hibernate.type.MaterializedBlobType")
@Override
public byte[] getContent() {
    return super.getContent();
}
项目:testcube-server    文件:TestPlan.java   
@Lob
@Column
@Type(type="org.hibernate.type.StringClobType")
@Override
public String getDocument() {
    return super.getDocument();
}
项目:testcube-server    文件:TestCase.java   
@Lob
@Column
@Type(type = "org.hibernate.type.StringClobType")
@Override
public String getSetup() {
    return super.getSetup();
}
项目:testcube-server    文件:TestCase.java   
@Lob
@Column
@Type(type = "org.hibernate.type.StringClobType")
@Override
public String getAction() {
    return super.getAction();
}
项目:testcube-server    文件:TestCase.java   
@Lob
@Type(type = "org.hibernate.type.StringClobType")
@Column
@Override
public String getExpected() {
    return super.getExpected();
}
项目:testcube-server    文件:CaseAttachment.java   
@Lob
@Column(nullable = false)
@Type(type = "org.hibernate.type.MaterializedBlobType")
@Override
public byte[] getContent() {
    return super.getContent();
}
项目:testcube-server    文件:TestRun.java   
@Lob
@Column
@Type(type = "org.hibernate.type.StringClobType")
@Override
public String getDescription() {
    return super.getDescription();
}
项目:pedal-dialect    文件:ExoticTypes.java   
@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;
}
项目:pedal-dialect    文件:ExoticTypes.java   
@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;
}
项目:scheduling    文件:TaskData.java   
@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;
}
项目:elide    文件:Person.java   
@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;
}
项目:elide    文件:Person.java   
@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;
}
项目:pedal-loader    文件:ExoticTypes.java   
@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;
}
项目:openyu-commons    文件:SeqIdAuditNamesEntitySupporter.java   
@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();
}
项目:openyu-commons    文件:NamesEntitySupporter.java   
@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;
}
项目:openyu-commons    文件:SeqAuditEntitySupporter.java   
@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;
}
项目:openyu-commons    文件:SeqIdAuditEntitySupporter.java   
@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;
}
项目:openyu-commons    文件:DogPoImpl.java   
@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;
}
项目:openyu-commons    文件:CatPoImpl.java   
@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();
}
项目:openyu-commons    文件:CatPoImpl.java   
@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;
}
项目:Hibernate_Composite_Primary_Key_MAVEN_Annotation    文件:Employee.java   
@Column(length=10,precision=2)
@Type(type="float")
public float getSal() {
    return sal;
}
项目:Hibernate_Composite_Primary_Key_MAVEN_Annotation    文件:Compid.java   
@Id
@Column(length=10)
@Type(type="int")
public int getId() {
    return id;
}
项目:Hibernate_Composite_Primary_Key_MAVEN_Annotation    文件:Compid.java   
@Column(length=15)
@Type(type="string")
public String getName() {
    return name;
}
项目:Hibernate_Native_SQL_Maven_Annotation    文件:Employee.java   
@Id
@Column(length=10)
@Type(type="int")
public int getId() {
    return id;
}
项目:Hibernate_Native_SQL_Maven_Annotation    文件:Employee.java   
@Column(length=15)
@Type(type="string")
public String getName() {
    return name;
}
项目:Hibernate_Native_SQL_Maven_Annotation    文件:Employee.java   
@Column(length=15,precision=2)
@Type(type="float")
public float getSal() {
    return sal;
}
项目:nixmash-blog    文件:Post.java   
@Type(type = "org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime")
@CreatedDate
public ZonedDateTime getPostDate() {
    return postDate;
}