Java 类javax.persistence.Lob 实例源码

项目:oma-riista-web    文件:JpaModelTest.java   
@Test
public void stringFieldsMustHaveExplicitAndConsistentLengthDefinition() {
    final Stream<Field> failedFields = filterFieldsOfManagedJpaTypes(field -> {
        final int modifiers = field.getModifiers();

        if (String.class.isAssignableFrom(field.getType()) &&
                !Modifier.isStatic(modifiers) &&
                !Modifier.isTransient(modifiers) &&
                !field.isAnnotationPresent(Transient.class) &&
                !field.isAnnotationPresent(Lob.class)) {

            final Column column = field.getAnnotation(Column.class);
            final Size size = field.getAnnotation(Size.class);

            return column == null && !hasIdGetter(field) ||
                    column != null && size != null && column.length() != size.max();
        }

        return false;
    });

    assertNoFields(failedFields,
            "These entity fields should be explicitly annotated with @Column and @Size with consistency on " +
                    "field's maximum length: ");
}
项目:myWMS    文件:PojoForm.java   
protected void buildForm(SimpleFormBuilder form, List<PropertyDescriptor> descriptors) {
    for(PropertyDescriptor pds : descriptors) {
        if ("class".equals(pds.getName())) continue; // skip the class property
        else if (Collection.class.isAssignableFrom(pds.getPropertyType())) {
            addListFor(pds);
        }
        else if (pds.getReadMethod().isAnnotationPresent(Lob.class)) {
            TextArea area = new TextArea();
            area.setPrefRowCount(10);
            addRight(BeanUtils.getDisplayName(pds), area);
            addToNamespace(pds.getName(), area);                
        }
        else {
            Row row = form.row();
            row.apply(r -> addFieldFor(r, pds));
            HBox spring = new HBox();
            spring.setPrefSize(0, 0);
            spring.setMinSize(0, 0);
            spring.setMaxSize(Double.MAX_VALUE, 0);

            row.fieldNode(spring);
            row.hGrow(Priority.SOMETIMES);
            row.end();
        }
    }
}
项目:crnk-framework    文件:JpaResourceFieldInformationProvider.java   
@Override
public Optional<Boolean> isSortable(BeanAttributeInformation attributeDesc) {
    Optional<Lob> lob = attributeDesc.getAnnotation(Lob.class);
    if (lob.isPresent()) {
        return Optional.of(false);
    }
    return Optional.empty();
}
项目:crnk-framework    文件:JpaResourceFieldInformationProvider.java   
@Override
public Optional<Boolean> isFilterable(BeanAttributeInformation attributeDesc) {
    Optional<Lob> lob = attributeDesc.getAnnotation(Lob.class);
    if (lob.isPresent()) {
        return Optional.of(false);
    }
    return Optional.empty();
}
项目:oasp-tutorial-sources    文件:BinaryObjectEntity.java   
/**
 * Remove the following line completely (Type Annotation) in case of database other than PostGres and Uncomment the
 * annotation for @Lob
 */
// @Type(type = "org.hibernate.type.BinaryType")
@Lob
public Blob getData() {

  return this.data;
}
项目:myWMS    文件:MyWMSForm.java   
public void doFields(SimpleFormBuilder form, int colCount, String[] names) {
    int col = 0;
    Row row = null;
    for (String name : names) {
        PropertyDescriptor p = BeanUtils.getProperty(getBeanInfo(), name);
        if (p == null) {
            log.log(Level.WARNING, "Unable to find property {0}", name);
            continue;
        }
        else if (List.class.isAssignableFrom(p.getPropertyType())) {
            addListFor(p);
        }
        else if (p.getReadMethod().isAnnotationPresent(Lob.class)) {
            TextArea area = new TextArea();
            area.setPrefRowCount(10);
            addRight(BeanUtils.getDisplayName(p), area);
            addToNamespace(p.getName(), area);              
        }
        else {
            if (row == null) {
                row = form.row();
                col = 0;
            }
            row.apply(r -> addFieldFor(r, p));
            col ++;
            if (col >= colCount) {
                row.end();
                row = null;
            }
        }
    }
    if (row != null) {
        row.end();
    }
}
项目:my-paper    文件:DeliveryTemplate.java   
/**
 * 获取内容
 * 
 * @return 内容
 */
@NotEmpty
@Lob
@Column(nullable = false)
public String getContent() {
    return content;
}
项目:my-paper    文件:AdPosition.java   
/**
 * 获取模板
 * 
 * @return 模板
 */
@NotEmpty
@Lob
@Column(nullable = false)
public String getTemplate() {
    return template;
}
项目:stroom-stats    文件:StroomStatsStoreEntity.java   
@Override
@Column(name = SQLNameConstants.DESCRIPTION)
@Lob
public String getDescription() {
    return description;
}
项目:stroom-stats    文件:StroomStatsStoreEntity.java   
@Lob
@Column(name = SQLNameConstants.DATA, length = Integer.MAX_VALUE)
@ExternalFile
public String getData() {
    return data;
}
项目:Equella    文件:LanguageString.java   
@Lob
public String getText()
{
    return text;
}
项目:Equella    文件:Workflow.java   
@Lob
public WorkflowTreeNode getRoot()
{
    return root;
}
项目:lams    文件:JPAOverriddenAnnotationReader.java   
private void getLob(List<Annotation> annotationList, Element element) {
    Element subElement = element != null ? element.element( "lob" ) : null;
    if ( subElement != null ) {
        annotationList.add( AnnotationFactory.create( new AnnotationDescriptor( Lob.class ) ) );
    }
}
项目:lams    文件:PropertyBinder.java   
public Property makeProperty() {
    validateMake();
    LOG.debugf( "Building property %s", name );
    Property prop = new Property();
    prop.setName( name );
    prop.setNodeName( name );
    prop.setValue( value );
    prop.setLazy( lazy );
    prop.setCascade( cascade );
    prop.setPropertyAccessorName( accessType.getType() );

    if ( property != null ) {
        prop.setValueGenerationStrategy( determineValueGenerationStrategy( property ) );
    }

    NaturalId naturalId = property != null ? property.getAnnotation( NaturalId.class ) : null;
    if ( naturalId != null ) {
        if ( ! entityBinder.isRootEntity() ) {
            throw new AnnotationException( "@NaturalId only valid on root entity (or its @MappedSuperclasses)" );
        }
        if ( ! naturalId.mutable() ) {
            updatable = false;
        }
        prop.setNaturalIdentifier( true );
    }

    // HHH-4635 -- needed for dialect-specific property ordering
    Lob lob = property != null ? property.getAnnotation( Lob.class ) : null;
    prop.setLob( lob != null );

    prop.setInsertable( insertable );
    prop.setUpdateable( updatable );

    // this is already handled for collections in CollectionBinder...
    if ( Collection.class.isInstance( value ) ) {
        prop.setOptimisticLocked( ( (Collection) value ).isOptimisticLocked() );
    }
    else {
        final OptimisticLock lockAnn = property != null
                ? property.getAnnotation( OptimisticLock.class )
                : null;
        if ( lockAnn != null ) {
            //TODO this should go to the core as a mapping validation checking
            if ( lockAnn.excluded() && (
                    property.isAnnotationPresent( javax.persistence.Version.class )
                            || property.isAnnotationPresent( Id.class )
                            || property.isAnnotationPresent( EmbeddedId.class ) ) ) {
                throw new AnnotationException(
                        "@OptimisticLock.exclude=true incompatible with @Id, @EmbeddedId and @Version: "
                                + StringHelper.qualify( holder.getPath(), name )
                );
            }
        }
        final boolean isOwnedValue = !isToOneValue( value ) || insertable; // && updatable as well???
        final boolean includeInOptimisticLockChecks = ( lockAnn != null )
                ? ! lockAnn.excluded()
                : isOwnedValue;
        prop.setOptimisticLocked( includeInOptimisticLockChecks );
    }

    LOG.tracev( "Cascading {0} with {1}", name, cascade );
    this.mappingProperty = prop;
    return prop;
}
项目:tianti    文件:Article.java   
@Lob
public String getContent() {
    return content;
}
项目:tap17-muggl-javaee    文件:Part.java   
@Column(table="PERSISTENCE_ORDER_PART_DETAIL")
@Lob
public Serializable getDrawing() {
    return drawing;
}
项目:tap17-muggl-javaee    文件:Part.java   
@Column(table="PERSISTENCE_ORDER_PART_DETAIL")
@Lob
public String getSpecification() {
    return specification;
}
项目:Hibernate_Large_Objects_Maven_BLOB_CLOB    文件:Employee.java   
@Lob
public char[] getCarr() {
    return carr;
}
项目:Hibernate_Large_Objects_Maven_BLOB_CLOB    文件:Employee.java   
@Lob
public byte[] getBarr() {
    return barr;
}
项目:plumdo-work    文件:FormDefinition.java   
@Lob 
@Basic(fetch = FetchType.LAZY) 
@Column(name = "EDITOR_SOURCE_BYTES_")
public byte[] getEditorSourceBytes() {
    return this.editorSourceBytes;
}
项目:plumdo-work    文件:FormModel.java   
@Lob 
@Basic(fetch = FetchType.LAZY) 
@Column(name = "EDITOR_SOURCE_BYTES_")
public byte[] getEditorSourceBytes() {
    return this.editorSourceBytes;
}
项目:appng-examples    文件:Person.java   
@Lob
@JsonIgnore
public byte[] getPictureData() {
    return pictureData;
}
项目:helium    文件:ExecucioMassiva.java   
@Lob
@Column(name="param2")
public byte[] getParam2() {
    return param2;
}
项目:helium    文件:Document.java   
@Lob
@Basic
@Column(name="arxiu_contingut")
public byte[] getArxiuContingut() {
    return arxiuContingut;
}
项目:helium    文件:ExpedientHelium.java   
@Lob
@Column(name="error_full")
public String getErrorFull() {
    return errorFull;
}
项目:helium    文件:Portasignatures.java   
@Lob
@Column(name="error_cb_proces")
public String getErrorCallbackProcessant() {
    return errorCallbackProcessant;
}
项目:helium    文件:DocumentStore.java   
@Lob
@Basic(fetch=FetchType.LAZY)
@Column(name="arxiu_contingut")
public byte[] getArxiuContingut() {
    return arxiuContingut;
}
项目:helium    文件:Expedient.java   
@Lob
@Column(name="error_full")
public String getErrorFull() {
    return errorFull;
}
项目:helium    文件:ExecucioMassivaExpedient.java   
@Lob
@Column(name="error")
public String getError() {
    return error;
}
项目:helium    文件:Consulta.java   
@Lob
@Basic(fetch=FetchType.LAZY)
@Column(name="informe_contingut")
public byte[] getInformeContingut() {
    return informeContingut;
}
项目:webpedidos    文件:Pedido.java   
@Lob
// @Transient
public String getObservacao() {
    return this.observacao;
}
项目:OSCAR-ConCert    文件:CssStyle.java   
@Lob()
public String getStyle() {
    return this.style;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
public String getC_birthRemarks() {
    return this.c_birthRemarks;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
public String getC_famHistory() {
    return this.c_famHistory;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
public String getC_riskFactors() {
    return this.c_riskFactors;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
@Column(name="p1_development1m")
public String getP1Development1m() {
    return this.p1Development1m;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
@Column(name="p1_development1w")
public String getP1Development1w() {
    return this.p1Development1w;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
@Column(name="p1_development2w")
public String getP1Development2w() {
    return this.p1Development2w;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
@Column(name="p1_immunization1m")
public String getP1Immunization1m() {
    return this.p1Immunization1m;
}
项目:OSCAR-ConCert    文件:FormRourke2009.java   
@Lob()
@Column(name="p1_immunization1w")
public String getP1Immunization1w() {
    return this.p1Immunization1w;
}