com.j256.ormlite.field.types.LongStringType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ormlite-core Show documentation
Show all versions of ormlite-core Show documentation
Lightweight Object Relational Model (ORM) for persisting objects to SQL databases.
package com.j256.ormlite.field.types;
import com.j256.ormlite.field.SqlType;
/**
* Persists the {@link String} Java class but with more storage in the database.
*
* @author graywatson
*/
public class LongStringType extends StringType {
private static final LongStringType singleTon = new LongStringType();
public static LongStringType getSingleton() {
return singleTon;
}
private LongStringType() {
super(SqlType.LONG_STRING, new Class[0]);
}
/**
* Here for others to subclass.
*/
protected LongStringType(SqlType sqlType, Class[] classes) {
super(sqlType, classes);
}
@Override
public boolean isAppropriateId() {
return false;
}
@Override
public int getDefaultWidth() {
return 0;
}
@Override
public Class getPrimaryClass() {
return String.class;
}
}