/** * Processes an equals() request against the SCO's run-time data. * * @param iRequest The request (<code>DMRequest</code>) being processed. * @return A data model error code indicating the result of this operation. */ public int equals(DMRequest iRequest) { // Assume no processing errors int result = DMErrorCodes.NO_ERROR; // Make sure there is a request to process and some data model to // process it on if (iRequest != null && mDataModels != null) { RequestToken tok = iRequest.getNextToken(); // The first request token must be a data model token if (tok.getType() == RequestToken.TOKEN_DATA_MODEL) { DataModel dm = (DataModel) mDataModels.get(tok.getValue()); // Make sure the data model exists if (dm != null) { // Process this request result = dm.equals(iRequest); } else { // Specified data model element does not exist result = DMErrorCodes.UNDEFINED_ELEMENT; } } else { // No data model specified result = DMErrorCodes.INVALID_REQUEST; } } else { // Nothing to process or nothing to process on result = DMErrorCodes.UNKNOWN_EXCEPTION; } return result; }
@Override public void getPropertyInfo( int propertyIndex, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) { int count = super.getPropertyCount(); if (propertyIndex >= count + 0 && propertyIndex <= count + 0 + this.owners.size()) { info.type = DMObject.class; info.name = "owners"; info.namespace = "http://www.1c.ru/dm"; } if (propertyIndex >= count + 0 + this.owners.size() && propertyIndex <= count + 0 + this.owners.size() + this.columnSet.size()) { info.type = PropertyInfo.STRING_CLASS; info.name = "columnSet"; info.namespace = "http://www.1c.ru/dm"; } super.getPropertyInfo(propertyIndex, arg1, info); }