本文整理汇总了Java中com.odoo.core.orm.fields.OColumn.isFunctionalColumn方法的典型用法代码示例。如果您正苦于以下问题:Java OColumn.isFunctionalColumn方法的具体用法?Java OColumn.isFunctionalColumn怎么用?Java OColumn.isFunctionalColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.odoo.core.orm.fields.OColumn
的用法示例。
在下文中一共展示了OColumn.isFunctionalColumn方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateProjection
import com.odoo.core.orm.fields.OColumn; //导入方法依赖的package包/类
private String[] updateProjection(String[] projection) {
HashSet<String> names = new HashSet<>();
String[] allProjection = projection;
if (allProjection == null) {
allProjection = projection();
} else {
for (String col : projection) {
OColumn column = getColumn(col);
if (column.isFunctionalColumn() && column.canFunctionalStore()) {
names.add(column.getName());
}
}
}
names.addAll(Arrays.asList(allProjection));
names.addAll(Arrays.asList(new String[]{OColumn.ROW_ID, "id", "_write_date", "_is_dirty", "_is_active"}));
return names.toArray(new String[names.size()]);
}
示例2: updateProjection
import com.odoo.core.orm.fields.OColumn; //导入方法依赖的package包/类
private String[] updateProjection(String[] projection) {
HashSet<String> names = new HashSet<>();
String[] allProjection = projection;
if (allProjection == null) {
allProjection = projection();
} else {
for (String col : projection) {
OColumn column = getColumn(col);
if (column.isFunctionalColumn() && column.canFunctionalStore()) {
names.add(column.getName());
}
}
}
names.addAll(Arrays.asList(allProjection));
names.addAll(Arrays.asList(OColumn.ROW_ID, "id", "_write_date", "_is_dirty", "_is_active"));
return names.toArray(new String[names.size()]);
}
示例3: OdooFields
import com.odoo.core.orm.fields.OColumn; //导入方法依赖的package包/类
public OdooFields(List<OColumn> columns) {
List<String> fields = new ArrayList<>();
if (columns != null) {
for (OColumn column : columns) {
if (!column.isLocal() && !column.isFunctionalColumn()) {
fields.add(column.getName());
}
}
}
addAll(fields.toArray(new String[fields.size()]));
}
示例4: prepareFields
import com.odoo.core.orm.fields.OColumn; //导入方法依赖的package包/类
private void prepareFields() {
mColumns.clear();
mRelationColumns.clear();
List<Field> fields = new ArrayList<>();
fields.addAll(Arrays.asList(getClass().getSuperclass().getDeclaredFields()));
fields.addAll(Arrays.asList(getClass().getDeclaredFields()));
mDeclaredFields.clear();
for (Field field : fields) {
if (field.getType().isAssignableFrom(OColumn.class)) {
String name = field.getName();
try {
OColumn column = getColumn(field);
if (column != null) {
name = column.getName();
if (column.getRelationType() != null) {
mRelationColumns.add(column);
}
if (column.isFunctionalColumn()) {
if (column.canFunctionalStore()) {
mColumns.add(column);
}
mFunctionalColumns.add(column);
} else {
mColumns.add(column);
}
}
} catch (Exception e) {
e.printStackTrace();
}
mDeclaredFields.put(name, field);
}
}
}
示例5: getFunctionalMethodValue
import com.odoo.core.orm.fields.OColumn; //导入方法依赖的package包/类
public Object getFunctionalMethodValue(OColumn column, Object record) {
if (column.isFunctionalColumn()) {
Method method = column.getFunctionalMethod();
OModel model = this;
try {
return method.invoke(model, new Object[]{record});
} catch (Exception e) {
e.printStackTrace();
}
}
return false;
}