Search in sources :

Example 6 with RecordSchema

use of jp.ossc.nimbus.beans.dataset.RecordSchema in project nimbus by nimbus-org.

the class SharedContextRecord method updateParseProperty.

/**
 * 指定された名前のプロパティに、指定された値をパースして更新した場合の差分情報を取得する。<p>
 *
 * @param name プロパティ名
 * @param val プロパティの値
 * @param diff 差分
 * @return 差分
 * @exception PropertySetException プロパティの設定に失敗した場合
 * @exception SharedContextUpdateException 差分情報の取得に失敗した場合
 */
public SharedContextValueDifference updateParseProperty(String name, Object val, SharedContextValueDifference diff) throws PropertySetException, SharedContextUpdateException {
    RecordSchema recordSchema = getRecordSchema();
    if (recordSchema == null) {
        throw new PropertySetException(null, "Schema is not initialized.");
    }
    final PropertySchema propertySchema = recordSchema.getPropertySchema(name);
    if (propertySchema == null) {
        throw new PropertySetException(null, "No such property : " + name);
    }
    return updateProperty(recordSchema.getPropertyIndex(name), propertySchema.parse(val), diff);
}
Also used : PropertySetException(jp.ossc.nimbus.beans.dataset.PropertySetException) PropertySchema(jp.ossc.nimbus.beans.dataset.PropertySchema) RecordSchema(jp.ossc.nimbus.beans.dataset.RecordSchema)

Aggregations

RecordSchema (jp.ossc.nimbus.beans.dataset.RecordSchema)6 PropertySchema (jp.ossc.nimbus.beans.dataset.PropertySchema)5 PropertySetException (jp.ossc.nimbus.beans.dataset.PropertySetException)3 Record (jp.ossc.nimbus.beans.dataset.Record)2 RecordList (jp.ossc.nimbus.beans.dataset.RecordList)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 XPathExpression (javax.xml.xpath.XPathExpression)1 XPathExpressionException (javax.xml.xpath.XPathExpressionException)1 NoSuchPropertyException (jp.ossc.nimbus.beans.NoSuchPropertyException)1 Property (jp.ossc.nimbus.beans.Property)1 SimpleProperty (jp.ossc.nimbus.beans.SimpleProperty)1 DataSet (jp.ossc.nimbus.beans.dataset.DataSet)1 PropertySchemaDefineException (jp.ossc.nimbus.beans.dataset.PropertySchemaDefineException)1 RecordListPropertySchema (jp.ossc.nimbus.beans.dataset.RecordListPropertySchema)1