Java 类org.hibernate.type.SerializableToBlobType 实例源码

项目:hibernate-ogm-redis    文件:RedisHashTypeConverter.java   
/**
 * Returns the {@link GridType} representing the {@link Type}.
 *
 * @param type the Type that needs conversion
 *
 * @return the corresponding GridType
 */
public GridType convert(Type type) {

    if ( type instanceof CustomType ) {
        CustomType customType = (CustomType) type;
        if ( customType.getUserType() instanceof EnumType ) {
            EnumType enumType = (EnumType) customType.getUserType();
            return ( new RedisHashEnumType( customType, enumType ) );
        }
    }

    if ( type instanceof SerializableToBlobType ) {
        return new SerializableAsStringType( ( (SerializableToBlobType) type ).getJavaTypeDescriptor() );
    }

    return conversionMap.get( type );
}
项目:hibernate-ogm-redis    文件:RedisJsonTypeConverter.java   
/**
 * Returns the {@link GridType} representing the {@link Type}.
 *
 * @param type the Type that needs conversion
 *
 * @return the corresponding GridType
 */
public GridType convert(Type type) {
    if ( type instanceof SerializableToBlobType ) {
        SerializableToBlobType<?> exposedType = (SerializableToBlobType<?>) type;
        return new RedisSerializableType<>( exposedType.getJavaTypeDescriptor() );
    }

    return (AbstractGenericBasicType<Object>) conversionMap.get( type );
}
项目:lams    文件:LobTypeResolver.java   
@Override
public String resolveHibernateTypeName(AnnotationInstance annotationInstance) {
    if ( annotationInstance == null ) {
        return null;
    }
    String type = null;
    if ( Clob.class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = StandardBasicTypes.CLOB.getName();
    }
    else if ( Blob.class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = StandardBasicTypes.BLOB.getName();
    }
    else if ( String.class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = StandardBasicTypes.MATERIALIZED_CLOB.getName();
    }
    else if ( Character[].class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = CharacterArrayClobType.class.getName();
    }
    else if ( char[].class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = PrimitiveCharacterArrayClobType.class.getName();
    }
    else if ( Byte[].class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = WrappedMaterializedBlobType.class.getName();
    }
    else if ( byte[].class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = StandardBasicTypes.MATERIALIZED_BLOB.getName();
    }
    else if ( Serializable.class.isAssignableFrom( mappedAttribute.getAttributeType() ) ) {
        type = SerializableToBlobType.class.getName();
    }
    else {
        type = "blob";
    }
    return type;
}
项目:lams    文件:LobTypeResolver.java   
@Override
protected Map<String, String> resolveHibernateTypeParameters(AnnotationInstance annotationInstance) {
    if ( getExplicitHibernateTypeName().equals( SerializableToBlobType.class.getName() ) ) {
        HashMap<String, String> typeParameters = new HashMap<String, String>();
        typeParameters.put(
                SerializableToBlobType.CLASS_NAME,
                mappedAttribute.getAttributeType().getName()
        );
        return typeParameters;
    }
    return null;
}
项目: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;
}
项目:scheduling    文件:TaskData.java   
@Column(name = "JVM_ARGUMENTS")
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @org.hibernate.annotations.Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public List<String> getJvmArguments() {
    return jvmArguments;
}
项目:scheduling    文件:TaskData.java   
@Column(name = "CLASSPATH")
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @org.hibernate.annotations.Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public List<String> getAdditionalClasspath() {
    return additionalClasspath;
}
项目:scheduling    文件:TaskData.java   
@Column(name = "GENERIC_INFO", updatable = false)
@Type(type = "org.ow2.proactive.scheduler.core.db.types.NonEmptyMapToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Map<String, String> getGenericInformation() {
    return genericInformation;
}
项目:scheduling    文件:JobData.java   
@Column(name = "GENERIC_INFO", length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Map<String, String> getGenericInformation() {
    return genericInformation;
}
项目:scheduling    文件:TaskResultData.java   
@Column(name = "PROPAGATED_VARIABLES", length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Map<String, byte[]> getPropagatedVariables() {
    return propagatedVariables;
}
项目:scheduling    文件:TaskResultData.java   
@Column(name = "METADATA", length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Map<String, String> getMetadata() {
    return metadata;
}
项目:scheduling    文件:SelectionScriptData.java   
@Column(name = "PARAMETERS")
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public List<Serializable> getScriptParameters() {
    return scriptParameters;
}
项目:scheduling    文件:ScriptData.java   
@Column(name = "PARAMETERS", length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public List<Serializable> getScriptParameters() {
    return scriptParameters;
}
项目:scheduling    文件:NodeSourceData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Object[] getInfrastructureParameters() {
    return infrastructureParameters;
}
项目:scheduling    文件:NodeSourceData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Object[] getPolicyParameters() {
    return policyParameters;
}
项目:scheduling    文件:NodeSourceData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Client getProvider() {
    return provider;
}
项目:scheduling    文件:NodeSourceData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Map<String, Serializable> getInfrastructureVariables() {
    return infrastructureVariables;
}
项目:scheduling    文件:RMNodeData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Client getOwner() {
    return owner;
}
项目:scheduling    文件:RMNodeData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Client getProvider() {
    return provider;
}
项目:scheduling    文件:RMNodeData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public Permission getUserPermission() {
    return userPermission;
}
项目:scheduling    文件:RMNodeData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public NodeState getState() {
    return state;
}
项目:scheduling    文件:RMNodeData.java   
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.SerializableToBlobType", parameters = @Parameter(name = SerializableToBlobType.CLASS_NAME, value = "java.lang.Object"))
public String[] getJmxUrls() {
    return jmxUrls;
}