Package simpleorm.dataset
Class SFieldBlob
java.lang.Object
simpleorm.dataset.SFieldMeta
simpleorm.dataset.SFieldScalar
simpleorm.dataset.SFieldBlob
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BlobField
Represents a BLOB, Binary large object. See SFieldBytes for short binary strings. Supports returning the entire blob
as a byte array, but that is not normal practice. ### Untested.
- See Also:
-
Field Summary
Fields inherited from class simpleorm.dataset.SFieldScalar
sqlDataTypeOverride, theGeneratorFields inherited from class simpleorm.dataset.SFieldMeta
quoteName -
Constructor Summary
ConstructorsConstructorDescriptionSFieldBlob(SRecordMeta meta, String columnName, int maxSize, SFieldFlags... pvals) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectConverts the parameter from the raw type parameter to the correct internal Object type that is stored in the data set.The default data type if not overriden by overrideSqlDataType.booleanisFKeyCompatible(SFieldScalar field) intqueryFieldValue(ResultSet rs, int sqlIndex) Issues a JDBC get*() on the result set for the field and converts the database type to the appropriate internal type, eg, Double for a double field.writeFieldValue(Object value) Converts a single value from internal representation to database representation.Methods inherited from class simpleorm.dataset.SFieldScalar
getColumnName, getGeneratorMode, getGeneratorParameter, getMaxSize, getReferences, getTheGenerator, isForeignKey, isGenerated, isMandatory, isNotOptimisticLocked, isPrimary, overrideSqlDataType, setGeneratorMode, setMaxSize, setTheGenerator, toLongerStringMethods inherited from class simpleorm.dataset.SFieldMeta
addFlag, addValidator, doValidate, equals, getFieldName, getFlags, getRecordMeta, getUserProperties, getUserProperty, getValidators, hashCode, isDescriptive, isUnqueried, nextGeneratedValue, putUserProperty, readResolve, setQuoted, toString, writeFieldValue
-
Constructor Details
-
SFieldBlob
-
-
Method Details
-
queryFieldValue
Description copied from class:SFieldMetaIssues a JDBC get*() on the result set for the field and converts the database type to the appropriate internal type, eg, Double for a double field. The first column has sqlIndex==1.- Specified by:
queryFieldValuein classSFieldMeta- Throws:
Exception
-
convertToDataSetFieldType
Description copied from class:SFieldMetaConverts the parameter from the raw type parameter to the correct internal Object type that is stored in the data set. Returns the object if no conversion necessary. Used bySRecordInstance.setObjectetc., Not getObject.- Specified by:
convertToDataSetFieldTypein classSFieldMeta
-
defaultSqlDataType
Description copied from class:SFieldScalarThe default data type if not overriden by overrideSqlDataType. This is only called when the data type is actually needed by CREATE TABLE, ie if no sqlDataTypeOverride is specified.- Specified by:
defaultSqlDataTypein classSFieldScalar
-
isFKeyCompatible
-
javaSqlType
public int javaSqlType()- Specified by:
javaSqlTypein classSFieldScalar- Returns:
- int constant from java.sql.Types, used for setting sql datatype with null values
-
writeFieldValue
Description copied from class:SFieldMetaConverts a single value from internal representation to database representation. Used primarily by the writeFieldValue above, but also used for converting optimistic lock values in SRecordInstance.flush.Overidden by SFieldBoolean. (not by SFieldString).
NOTE: This does NOT need to handle NULL values (those are handled seperately by SRecordInstance)
- Overrides:
writeFieldValuein classSFieldMeta
-