public FieldPathUpdate(Type updType, DocumentType docType, String fieldPath, String whereClause) { this.updType = updType; this.docType = docType; try { setWhereClause(whereClause); } catch (ParseException e) { throw new IllegalArgumentException(e); } setFieldPath(fieldPath); }
public void read(FieldPathUpdate update) { String whereClause = null; String fieldPath = null; for (int i = 0; i < reader.getAttributeCount(); i++) { if (reader.getAttributeName(i).toString().equals("where")) { whereClause = reader.getAttributeValue(i); } else if (reader.getAttributeName(i).toString().equals("fieldpath")) { fieldPath = reader.getAttributeValue(i); } } if (fieldPath != null) { update.setFieldPath(fieldPath); } else { throw newDeserializeException("Field path is required for document updates."); } if (whereClause != null) { try { update.setWhereClause(whereClause); } catch (ParseException e) { throw newException(e); } } }
public void read(FieldPathUpdate update) { String fieldPath = getString(null); String whereClause = getString(null); update.setFieldPath(fieldPath); try { update.setWhereClause(whereClause); } catch (ParseException e) { throw new DeserializationException(e); } }
public void read(FieldPathUpdate update) { String fieldPath = getString(null); String whereClause = getString(null); update.setFieldPath(fieldPath); try { update.setWhereClause(whereClause); } catch (ParseException e) { throw new DeserializationException(e); } }