/** * Return a String representation of this Object. * @return a String representation of the dyna property */ @Override public String toString() { final StringBuilder sb = new StringBuilder("DynaProperty[name="); sb.append(this.name); sb.append(",type="); sb.append(this.type); if (isMapped() || isIndexed()) { sb.append(" <").append(this.contentType).append(">"); } sb.append("]"); return (sb.toString()); }
/** * Determines the type of a {@code DynaProperty}. Here a special treatment * is needed for mapped properties. * * @param dynaProperty the property descriptor * @param value the value object to be set for this property * @return the type of this property */ private static Class<?> dynaPropertyType(final DynaProperty dynaProperty, final Object value) { if (!dynaProperty.isMapped()) { return dynaProperty.getType(); } return (value == null) ? String.class : value.getClass(); } }
/** * Return a String representation of this Object. * @return a String representation of the dyna property */ @Override public String toString() { final StringBuilder sb = new StringBuilder("DynaProperty[name="); sb.append(this.name); sb.append(",type="); sb.append(this.type); if (isMapped() || isIndexed()) { sb.append(" <").append(this.contentType).append(">"); } sb.append("]"); return (sb.toString()); }
/** * Determines the type of a {@code DynaProperty}. Here a special treatment * is needed for mapped properties. * * @param dynaProperty the property descriptor * @param value the value object to be set for this property * @return the type of this property */ private static Class<?> dynaPropertyType(final DynaProperty dynaProperty, final Object value) { if (!dynaProperty.isMapped()) { return dynaProperty.getType(); } return (value == null) ? String.class : value.getClass(); } }
/** * Writes this object safely. * There are issues with serializing primitive class types on certain JVM versions * (including java 1.3). * This method provides a workaround. */ private void writeObject(final ObjectOutputStream out) throws IOException { writeAnyClass(this.type,out); if (isMapped() || isIndexed()) { writeAnyClass(this.contentType,out); } // write out other values out.defaultWriteObject(); }
/** * Writes this object safely. * There are issues with serializing primitive class types on certain JVM versions * (including java 1.3). * This method provides a workaround. */ private void writeObject(final ObjectOutputStream out) throws IOException { writeAnyClass(this.type,out); if (isMapped() || isIndexed()) { writeAnyClass(this.contentType,out); } // write out other values out.defaultWriteObject(); }
/** * Reads field values for this object safely. * There are issues with serializing primitive class types on certain JVM versions * (including java 1.3). * This method provides a workaround. * * @throws StreamCorruptedException when the stream data values are outside expected range */ private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { this.type = readAnyClass(in); if (isMapped() || isIndexed()) { this.contentType = readAnyClass(in); } // read other values in.defaultReadObject(); }
/** * Reads field values for this object safely. * There are issues with serializing primitive class types on certain JVM versions * (including java 1.3). * This method provides a workaround. * * @throws StreamCorruptedException when the stream data values are outside expected range */ private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { this.type = readAnyClass(in); if (isMapped() || isIndexed()) { this.contentType = readAnyClass(in); } // read other values in.defaultReadObject(); }
if (!dynaClass.getDynaProperty(name).isMapped()) { throw new IllegalArgumentException ("Non-mapped property for '" + name + "(" + key + ")' "
if (!dynaClass.getDynaProperty(name).isMapped()) { throw new IllegalArgumentException ("Non-mapped property for '" + name + "(" + key + ")' "
if (!dynaClass.getDynaProperty(name).isMapped()) { throw new IllegalArgumentException ("Non-mapped property for '" + name + "(" + key + ")'"
if (!dynaClass.getDynaProperty(name).isMapped()) { throw new IllegalArgumentException ("Non-mapped property for '" + name + "(" + key + ")'"
/** * Return a String representation of this Object. * @return a String representation of the dyna property */ public String toString() { StringBuffer sb = new StringBuffer("DynaProperty[name="); sb.append(this.name); sb.append(",type="); sb.append(this.type); if (isMapped() || isIndexed()) { sb.append(" <").append(this.contentType).append(">"); } sb.append("]"); return (sb.toString()); }
/** * Return a String representation of this Object. * @return a String representation of the dyna property */ public String toString() { StringBuffer sb = new StringBuffer("DynaProperty[name="); sb.append(this.name); sb.append(",type="); sb.append(this.type); if (isMapped() || isIndexed()) { sb.append(" <").append(this.contentType).append(">"); } sb.append("]"); return (sb.toString()); }
private boolean isValidDynaProperty(DynaProperty prop) { if(prop.isIndexed() || prop.isMapped()) return false; Class type = prop.getType(); if(type.equals(String.class)) return true; if(type.equals(Boolean.class)) return true; if(type.equals(Integer.class)) return true; return false; }
/** * Writes this object safely. * There are issues with serializing primitive class types on certain JVM versions * (including java 1.3). * This method provides a workaround. */ private void writeObject(ObjectOutputStream out) throws IOException { writeAnyClass(this.type,out); if (isMapped() || isIndexed()) { writeAnyClass(this.contentType,out); } // write out other values out.defaultWriteObject(); }
/** * Writes this object safely. * There are issues with serializing primitive class types on certain JVM versions * (including java 1.3). * This method provides a workaround. */ private void writeObject(ObjectOutputStream out) throws IOException { writeAnyClass(this.type,out); if (isMapped() || isIndexed()) { writeAnyClass(this.contentType,out); } // write out other values out.defaultWriteObject(); }
public void remove(String property, String key) { if (!getDynaClass().getDynaProperty(property).isMapped()) throw new UnsupportedOperationException(); assert dynaClassInfo.isFunctional(property); SesameProperty sp = getSesameProperty(property); Map map = (Map) sp.getSingle(); if (map != null) map.remove(key); }
public boolean contains(String property, String key) { if (!getDynaClass().getDynaProperty(property).isMapped()) throw new UnsupportedOperationException(); assert dynaClassInfo.isFunctional(property); SesameProperty sp = getSesameProperty(property); Map map = (Map) sp.getSingle(); if (map == null) return false; return map.containsKey(key); }
public Object get(String property, String key) { if (!getDynaClass().getDynaProperty(property).isMapped()) throw new UnsupportedOperationException(); assert dynaClassInfo.isFunctional(property) : dynaClassInfo .getDynaProperty(property); SesameProperty sp = getSesameProperty(property); Map map = (Map) sp.getSingle(); if (map == null) return null; return map.get(key); }