本文整理汇总了Java中com.j256.ormlite.field.FieldType.isSelfGeneratedId方法的典型用法代码示例。如果您正苦于以下问题:Java FieldType.isSelfGeneratedId方法的具体用法?Java FieldType.isSelfGeneratedId怎么用?Java FieldType.isSelfGeneratedId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.j256.ormlite.field.FieldType
的用法示例。
在下文中一共展示了FieldType.isSelfGeneratedId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isFieldCreatable
import com.j256.ormlite.field.FieldType; //导入方法依赖的package包/类
private static boolean isFieldCreatable(DatabaseType paramDatabaseType, FieldType paramFieldType)
{
if (paramFieldType.isForeignCollection())
return false;
if ((paramDatabaseType.isIdSequenceNeeded()) && (paramDatabaseType.isSelectSequenceBeforeInsert()))
return true;
return (!paramFieldType.isGeneratedId()) || (paramFieldType.isSelfGeneratedId()) || (paramFieldType.isAllowGeneratedIdInsert());
}
示例2: addPrimaryKeySql
import com.j256.ormlite.field.FieldType; //导入方法依赖的package包/类
public void addPrimaryKeySql(FieldType[] paramArrayOfFieldType, List<String> paramList1, List<String> paramList2, List<String> paramList3, List<String> paramList4)
{
Object localObject = null;
int i = paramArrayOfFieldType.length;
for (int j = 0; j < i; j++)
{
FieldType localFieldType = paramArrayOfFieldType[j];
if (((!localFieldType.isGeneratedId()) || (generatedIdSqlAtEnd()) || (localFieldType.isSelfGeneratedId())) && (localFieldType.isId()))
{
if (localObject == null)
{
StringBuilder localStringBuilder = new StringBuilder(48);
localObject = localStringBuilder;
localStringBuilder.append("PRIMARY KEY (");
}
else
{
localObject.append(',');
}
appendEscapedEntityName(localObject, localFieldType.getColumnName());
}
}
if (localObject != null)
{
localObject.append(") ");
paramList1.add(localObject.toString());
}
}