Java Code Examples for javax.persistence.Column#updatable()

The following examples show how to use javax.persistence.Column#updatable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PersistentUtil.java    From mybatis-jpa with Apache License 2.0 5 votes vote down vote up
public static boolean updatable(Field field) {
  if (!isPersistentField(field) || isAssociationField(field)) {
    return false;
  }

  if (field.isAnnotationPresent(Column.class)) {
    Column column = field.getAnnotation(Column.class);
    return column.updatable();
  }

  return true;
}
 
Example 2
Source File: ModelTableImpl.java    From tephra with MIT License 5 votes vote down vote up
@Override
public void addColumn(String propertyName, Column column) {
    columns.put(column.name().toLowerCase(), propertyName);
    addLowerCase(propertyName);
    if (!column.updatable())
        natives.add(column.name());
}
 
Example 3
Source File: AccessibleProperty.java    From warpdb with Apache License 2.0 5 votes vote down vote up
boolean isUpdatable() {
	if (isId()) {
		return false;
	}
	Column col = this.accessible.getAnnotation(Column.class);
	return col == null || col.updatable();
}
 
Example 4
Source File: EntityManager.java    From dal with Apache License 2.0 4 votes vote down vote up
private void processUpdatableColumn(String columnName, Column column) {
	if (column == null || column.updatable())
		updatableColumnList.add(columnName);
}