public void unset(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("unset"); } unset(property, false); }
@Override public void unset(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("unset"); } unset(property, false); }
public boolean isSet(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("isSet"); } if (property.isMany()) { List value = getList(property); return !value.isEmpty(); } else { return isSetInternal(property); } }
@Override public boolean isSet(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("isSet"); } if (property.isMany()) { List value = getList(property); return !value.isEmpty(); } else { return isSetInternal(property); } }
/** * INTERNAL: * * @param property * @param cls * @return * @throws ClassCastException * @throws IllegalArgumentException */ public Object convertObjectToValue(Property property, Class cls) throws ClassCastException, IllegalArgumentException { //ie get String - convert(thisprop, String.class) if (null == property) { throw new IllegalArgumentException(SDOException.cannotPerformOperationOnNullArgument("convertObjectToValue")); } Object obj = unwrapListValue(property, get(property)); try { return ((SDODataHelper)aHelperContext.getDataHelper()).convertValueToClass(property, obj, cls); } catch (Exception e) { throw new ClassCastException("An error occurred during converison or an unsupported conversion was attempted."); } }
/** * INTERNAL: * * @param property * @param cls * @return * @throws ClassCastException * @throws IllegalArgumentException */ public Object convertObjectToValue(Property property, Class cls) throws ClassCastException, IllegalArgumentException { //ie get String - convert(thisprop, String.class) if (null == property) { throw new IllegalArgumentException(SDOException.cannotPerformOperationOnNullArgument("convertObjectToValue")); } Object obj = unwrapListValue(property, get(property)); try { return ((SDODataHelper)aHelperContext.getDataHelper()).convertValueToClass(property, obj, cls); } catch (Exception e) { throw new ClassCastException("An error occurred during converison or an unsupported conversion was attempted."); } }
public Date getDate(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("getDate"); } if (property.getType().equals(SDOConstants.SDO_STRING)) { DataHelper dHelper = aHelperContext.getDataHelper(); String dateString = (String)get(property); return dHelper.toDate(dateString); } Date propertyDateValue = (Date)convertObjectToValue(property, Date.class); return propertyDateValue; }
@Override public Date getDate(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("getDate"); } if (property.getType().equals(SDOConstants.SDO_STRING)) { DataHelper dHelper = aHelperContext.getDataHelper(); String dateString = (String)get(property); return dHelper.toDate(dateString); } Date propertyDateValue = (Date)convertObjectToValue(property, Date.class); return propertyDateValue; }
throw new IllegalArgumentException(SDOException.cannotPerformOperationOnNullArgument("convertObjectToValue"));
throw new IllegalArgumentException(SDOException.cannotPerformOperationOnNullArgument("convertObjectToValue"));
public List getList(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("getList");
@Override public List getList(Property property) { if (null == property) { throw SDOException.cannotPerformOperationOnNullArgument("getList");
throw SDOException.cannotPerformOperationOnNullArgument("unset");
throw SDOException.cannotPerformOperationOnNullArgument("unset");