Package jnipap

Examples of jnipap.Prefix


   * @param id Prefix ID to search for
   * @return Prefix with id 'id'
   */
  public static OPrefix getPrefix(OConnection conn, int id) throws JnipapException {

    Prefix p = Prefix.get((jnipap.Connection)conn, new Integer(id));
    return toSQLObj(p);

  }
View Full Code Here


   * Test adding and getting a prefix
   */
  @Test
  public void addGetPrefix() {

    Prefix prefix1, prefix2;

    prefix1 = new Prefix();
    prefix1.prefix = "192.168.0.0/16";
    prefix1.type = "reservation";
    prefix1.description = "RFC1918 class B block";

    try {
      prefix1.save(this.connection);
      prefix2 = Prefix.get(this.connection, prefix1.id);
    } catch (JnipapException e) {
      fail("Operation resulted in " + e.getClass().getName() + " with message \"" + e.getMessage() + "\"");
      return;
    }
View Full Code Here

TOP

Related Classes of jnipap.Prefix

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.