Package ch.agent.crnickl.api

Examples of ch.agent.crnickl.api.NamingPolicy


    return result;
  }
 
  @Override
  public Collection<String> getValues(String format) {
    NamingPolicy namingPolicy = getDatabase().getNamingPolicy();
    try {
      Map<T, String> map = getValueDescriptions();
      List<String> list = new ArrayList<String>(map.size());
      for (Map.Entry<T, String> e : map.entrySet()) {
        String value = toString(e.getKey());
        String descr = e.getValue();
        if (descr != null && descr.length() > 0) {
          if (format == null)
            value = namingPolicy.joinValueAndDescription(value, descr);
          else
            value = String.format(format, value, descr);
        }
        list.add(value);
      }
View Full Code Here


   * @param name the name of the database
   */
  public DatabaseBackendImpl(String name) {
    topChronicle = new NameSpace(name, String.format("%s (%s)", getClass().getSimpleName(), name), new SurrogateImpl(this, DBObjectType.CHRONICLE, 0));
    setMessageListener(null);
    nm = new NamingPolicy();
    am = new HashMap<String, ValueAccessMethods<?>>();
  }
View Full Code Here

   * @param name the name of the database
   */
  public DatabaseBackendImpl(String name) {
    topChronicle = new NameSpace(name, String.format("%s (%s)", getClass().getSimpleName(), name), new SurrogateImpl(this, DBObjectType.CHRONICLE, null));
    setMessageListener(null);
    nm = new NamingPolicy();
    am = new HashMap<String, ValueAccessMethods<?>>();
  }
View Full Code Here

    return result;
  }
 
  @Override
  public Collection<String> getValues(String format) {
    NamingPolicy namingPolicy = getDatabase().getNamingPolicy();
    try {
      Map<T, String> map = getValueDescriptions();
      List<String> list = new ArrayList<String>(map.size());
      for (Map.Entry<T, String> e : map.entrySet()) {
        String value = toString(e.getKey());
        String descr = e.getValue();
        if (descr != null && descr.length() > 0) {
          if (format == null)
            value = namingPolicy.joinValueAndDescription(value, descr);
          else
            value = String.format(format, value, descr);
        }
        list.add(value);
      }
View Full Code Here

   * @param name the name of the database
   */
  public DatabaseBackendImpl(String name) {
    topChronicle = new NameSpace(name, String.format("%s (%s)", getClass().getSimpleName(), name), new SurrogateImpl(this, DBObjectType.CHRONICLE, null));
    setMessageListener(null);
    nm = new NamingPolicy();
    am = new HashMap<String, ValueAccessMethods<?>>();
  }
View Full Code Here

TOP

Related Classes of ch.agent.crnickl.api.NamingPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.