db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/odmg FieldConversion_ForeigenKeyTest.java
Date Fri, 28 Feb 2003 12:37:05 GMT
arminw      2003/02/28 04:37:05

  Modified:    src/test/org/apache/ojb/broker
                        ConvertedKeyReferenceTest.java
                        FieldConversionForeigenKeyTest.java
               src/test/org/apache/ojb/odmg
                        FieldConversion_ForeigenKeyTest.java
  Added:       src/test/org/apache/ojb/broker FieldConversionTest.java
  Log:
  update/add field conversion test cases
  
  Revision  Changes    Path
  1.5       +189 -7    db-ojb/src/test/org/apache/ojb/broker/ConvertedKeyReferenceTest.java
  
  Index: ConvertedKeyReferenceTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/ConvertedKeyReferenceTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConvertedKeyReferenceTest.java	19 Feb 2003 10:37:55 -0000	1.4
  +++ ConvertedKeyReferenceTest.java	28 Feb 2003 12:37:05 -0000	1.5
  @@ -8,6 +8,10 @@
   package org.apache.ojb.broker;
   
   import junit.framework.TestCase;
  +import org.apache.commons.lang.builder.ToStringBuilder;
  +import org.apache.commons.lang.builder.ToStringStyle;
  +import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
  +import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryFactory;
  @@ -66,12 +70,11 @@
           while (i.hasNext())
           {
               ConversionReferrer cref = (ConversionReferrer) i.next();
  -            assertTrue("PK value not converted, id should be > 1000, found " + cref,
cref.getPk1() > 1000);
  +            assertTrue("PK value should not be converted, id should be < 1000, found
" + cref, cref.getPk1() < 1000);
               assertTrue("Reference id should be > 1000, found " + cref, cref.getRef1()
> 1000);
  -            assertTrue("Reference should be non-null, found "+cref, cref.getReferred()
!= null);
  +            assertTrue("Reference should be non-null, found " + cref, cref.getReferred()
!= null);
               assertEquals("Reference does not select correct item", cref.getRef1(), cref.getReferred().getPk1());
           }
  -
       }
   
       public void testMultipleConverted()
  @@ -87,8 +90,8 @@
           while (i.hasNext())
           {
               ConversionReferrer cref = (ConversionReferrer) i.next();
  -            assertTrue("PK value not converted, id should be > 1000, found " + cref,
cref.getPk1() > 1000);
  -            assertTrue("Reference should be non-null, found "+cref, cref.getReferred()
!= null);
  +            assertTrue("PK value should not be converted, id should be < 1000, found
" + cref, cref.getPk1() < 1000);
  +            assertTrue("Reference should be non-null, found " + cref, cref.getReferred()
!= null);
               assertEquals("Reference selected incorrect item", cref.getRef1(), cref.getReferred().getPk1());
   
               /*
  @@ -120,7 +123,7 @@
       public void testConvertedReferenceInsert()
       {
           String error = "Maybe field conversion was not called or multiple times";
  -        int no = Integer.MAX_VALUE - 110;
  +        int no = 110;
           int noRef = Integer.MAX_VALUE - 109;
           int noTest = Integer.MAX_VALUE - 108;
           int noTestRef = Integer.MAX_VALUE - 107;
  @@ -146,7 +149,7 @@
   
           ConversionReferrer referrer = (ConversionReferrer) broker.getObjectByIdentity(id);
           assertNotNull(cref.getReferred());
  -        assertNotNull("We should found a reference, found "+referrer, referrer.getReferred());
  +        assertNotNull("We should found a reference, found " + referrer, referrer.getReferred());
           assertEquals("Stored reference ID should match refed object pk", referrer.getRef1(),
crefed.getPk1());
           assertEquals(error, cref.getPk1(), referrer.getPk1());
           assertEquals(error, cref.getTestId(), referrer.getTestId());
  @@ -157,5 +160,184 @@
           // delete objects
           broker.delete(crefed);
           broker.delete(cref);
  +    }
  +
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    /**
  +     * A conversion class for unit testing. The conversion is nonsensical - java
  +     * field is difference of Integer.MAX_VALUE and db value.
  +     * @author  drfish
  +     */
  +    public static class TestInt2IntConverter implements FieldConversion
  +    {
  +
  +        /** Creates a new instance of FromMaxInt2IntConversion */
  +        public TestInt2IntConverter()
  +        {
  +        }
  +
  +        /** convert a Java object to its SQL pendant, used for insert & update */
  +        public Object javaToSql(Object source) throws ConversionException
  +        {
  +
  +            int val = ((Integer) source).intValue();
  +            val = Integer.MAX_VALUE - val;
  +            return new Integer(val);
  +        }
  +
  +        /** convert a SQL value to a Java Object, used for SELECT */
  +        public Object sqlToJava(Object source) throws ConversionException
  +        {
  +            int val = ((Integer) source).intValue();
  +            val = Integer.MAX_VALUE - val;
  +            return new Integer(val);
  +        }
  +    }
  +
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    public static class ConversionReferrer
  +    {
  +
  +        private int pk1;
  +        private int testId;
  +        private int ref1;
  +        private ConversionReferred referred;
  +
  +        /** Creates a new instance of ConversionParent */
  +        public ConversionReferrer()
  +        {
  +        }
  +
  +        public String toString()
  +        {
  +            ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
  +            buf.append("pk1", pk1);
  +            buf.append("ref1", ref1);
  +            buf.append("testId", testId);
  +            buf.append("referred", referred);
  +            return buf.toString();
  +        }
  +
  +        public int getTestId()
  +        {
  +            return testId;
  +        }
  +
  +        public void setTestId(int testId)
  +        {
  +            this.testId = testId;
  +        }
  +
  +        /** Getter for property pk1.
  +         * @return Value of property pk1.
  +         *
  +         */
  +        public int getPk1()
  +        {
  +            return pk1;
  +        }
  +
  +        /** Setter for property pk1.
  +         * @param pk1 New value of property pk1.
  +         *
  +         */
  +        public void setPk1(int pk1)
  +        {
  +            this.pk1 = pk1;
  +        }
  +
  +        /** Getter for property ref1.
  +         * @return Value of property ref1.
  +         *
  +         */
  +        public int getRef1()
  +        {
  +            return ref1;
  +        }
  +
  +        /** Setter for property ref1.
  +         * @param ref1 New value of property ref1.
  +         *
  +         */
  +        public void setRef1(int ref1)
  +        {
  +            this.ref1 = ref1;
  +        }
  +
  +        /** Getter for property referred.
  +         * @return Value of property referred.
  +         *
  +         */
  +        public ConversionReferred getReferred()
  +        {
  +            return referred;
  +        }
  +
  +        /** Setter for property referred.
  +         * @param referred New value of property referred.
  +         *
  +         */
  +        public void setReferred(ConversionReferred referred)
  +        {
  +            this.referred = referred;
  +        }
  +    }
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    public static class ConversionReferred
  +    {
  +
  +        private int pk1;
  +        private int testId;
  +
  +        /** Creates a new instance of ConversionReferred */
  +        public ConversionReferred()
  +        {
  +        }
  +
  +        public String toString()
  +        {
  +            ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
  +            buf.append("pk1", pk1);
  +            buf.append("testId", testId);
  +            return buf.toString();
  +        }
  +
  +        public int getTestId()
  +        {
  +            return testId;
  +        }
  +
  +        public void setTestId(int testId)
  +        {
  +            this.testId = testId;
  +        }
  +
  +        /** Getter for property pk1.
  +         * @return Value of property pk1.
  +         *
  +         */
  +        public int getPk1()
  +        {
  +            return pk1;
  +        }
  +
  +        /** Setter for property pk1.
  +         * @param pk1 New value of property pk1.
  +         *
  +         */
  +        public void setPk1(int pk1)
  +        {
  +            this.pk1 = pk1;
  +        }
  +
       }
   }
  
  
  
  1.4       +143 -8    db-ojb/src/test/org/apache/ojb/broker/FieldConversionForeigenKeyTest.java
  
  Index: FieldConversionForeigenKeyTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/FieldConversionForeigenKeyTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FieldConversionForeigenKeyTest.java	19 Feb 2003 10:37:55 -0000	1.3
  +++ FieldConversionForeigenKeyTest.java	28 Feb 2003 12:37:05 -0000	1.4
  @@ -6,9 +6,12 @@
   package org.apache.ojb.broker;
   
   import junit.framework.TestCase;
  +import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
  +import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.QueryFactory;
  -import org.apache.ojb.odmg.FieldConversion_Node;
  +
  +import java.math.BigDecimal;
   
   /**
    * Test using field conversions for PK values.
  @@ -55,28 +58,160 @@
   
       }
   
  -    public void testStoreNode() throws Exception
  +    /**
  +     * store nested classes needed field conversion of a primary key field.
  +     */
  +    public void testStoreNestedNodes() throws Exception
       {
  -        //String strQuery = "select allNodes from " + FieldConversion_Node.class.getName();
  +        //String strQuery = "select allNodes from " + Node.class.getName();
           long id = System.currentTimeMillis();
  -        FieldConversion_Node node = new FieldConversion_Node(id, null, true);
  -        FieldConversion_Node child = new FieldConversion_Node(id + 1, node, false);
  +        Node node = new Node(id, null, true);
  +        Node child = new Node(id + 1, node, false);
   
           int before;
   
           broker.beginTransaction();
  -        before = broker.getCount(QueryFactory.newQuery(FieldConversion_Node.class, (Criteria)
null));
  +        before = broker.getCount(QueryFactory.newQuery(Node.class, (Criteria) null));
   
           broker.store(child);
   
           broker.commitTransaction();
   
           broker.beginTransaction();
  -        int after = broker.getCount(QueryFactory.newQuery(FieldConversion_Node.class, (Criteria)
null));
  +        int after = broker.getCount(QueryFactory.newQuery(Node.class, (Criteria) null));
           broker.commitTransaction();
   
           assertFalse(after == 0);
           assertEquals(before + 2, after);
   
  +    }
  +
  +    /**
  +     * store class needed field conversion of a primary key field.
  +     */
  +    public void testStoreNode() throws Exception
  +    {
  +        //String strQuery = "select allNodes from " + Node.class.getName();
  +        long id = System.currentTimeMillis();
  +        Node node = new Node(id, null, false);
  +
  +        int before;
  +
  +        broker.beginTransaction();
  +        before = broker.getCount(QueryFactory.newQuery(Node.class, (Criteria) null));
  +
  +        broker.store(node);
  +
  +        broker.commitTransaction();
  +
  +        broker.beginTransaction();
  +        int after = broker.getCount(QueryFactory.newQuery(Node.class, (Criteria) null));
  +        broker.commitTransaction();
  +
  +        assertFalse(after == 0);
  +        assertEquals(before + 1, after);
  +
  +    }
  +
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    public static class LongToBigDecimalConversion implements FieldConversion
  +    {
  +        public LongToBigDecimalConversion()
  +        {
  +        }
  +
  +        public Object javaToSql(Object source) throws ConversionException
  +        {
  +            Object ret;
  +            if (source instanceof Long)
  +            {
  +                ret = new BigDecimal(((Long) source).doubleValue());
  +            }
  +            else
  +            {
  +                ret = source;
  +            }
  +            return ret;
  +        }
  +
  +        public Object sqlToJava(Object source) throws ConversionException
  +        {
  +            Object ret;
  +            if (source instanceof BigDecimal)
  +            {
  +                ret = new Long(((BigDecimal) source).longValue());
  +            }
  +            else
  +            {
  +                ret = source;
  +            }
  +            return ret;
  +        }
  +    }
  +
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    public class Node
  +    {
  +        private long uid;  // primary key
  +        private long refId;
  +        private boolean nodeState;
  +        Node parent;
  +
  +        public Node()
  +        {
  +        }
  +
  +        public Node(long uid, Node parent, boolean nodeState)
  +        {
  +            this.uid = uid;
  +            this.parent = parent;
  +            this.nodeState = nodeState;
  +        }
  +
  +        public long getUid()
  +        {
  +            return uid;
  +        }
  +
  +        public void setUid(long uid)
  +        {
  +            this.uid = uid;
  +        }
  +
  +        public boolean isState()
  +        {
  +            return nodeState;
  +        }
  +
  +        public void setState(boolean state)
  +        {
  +            this.nodeState = state;
  +        }
  +
  +        public long getRefId()
  +        {
  +            return refId;
  +        }
  +
  +        public void setRefId(long refId)
  +        {
  +            this.refId = refId;
  +        }
  +
  +        public Node getParent()
  +        {
  +            return parent;
  +        }
  +
  +        public void setParent(Node parent)
  +        {
  +            this.parent = parent;
  +        }
       }
   }
  
  
  
  1.1                  db-ojb/src/test/org/apache/ojb/broker/FieldConversionTest.java
  
  Index: FieldConversionTest.java
  ===================================================================
  package org.apache.ojb.broker;
  
  import junit.framework.TestCase;
  import org.apache.commons.lang.builder.ToStringBuilder;
  import org.apache.commons.lang.builder.ToStringStyle;
  import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
  import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
  
  /**
   * Test case to check the field conversion.
   *
   * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
   * @version $Id: FieldConversionTest.java,v 1.1 2003/02/28 12:37:05 arminw Exp $
   */
  public class FieldConversionTest extends TestCase
  {
      private PersistenceBroker broker;
  
      public static void main(String[] args)
      {
          String[] arr = {FieldConversionTest.class.getName()};
          junit.textui.TestRunner.main(arr);
      }
  
      /**
       * Insert the method's description here.
       * Creation date: (06.12.2000 21:58:53)
       */
      public void setUp() throws PBFactoryException
      {
          broker = PersistenceBrokerFactory.defaultPersistenceBroker();
      }
  
      /**
       * Insert the method's description here.
       * Creation date: (06.12.2000 21:59:14)
       */
      public void tearDown()
      {
          try
          {
              broker.clearCache();
              broker.close();
          }
          catch (PersistenceBrokerException e)
          {
          }
      }
  
      public void testConversion()
      {
          int id = (int) (System.currentTimeMillis() % Integer.MAX_VALUE);
          ConversionVO vo = new ConversionVO(
                  null, new ConversionId(new Integer(id)), null, new ConversionId(new Integer(id
+ 1)));
          broker.beginTransaction();
          broker.store(vo);
          broker.commitTransaction();
  
          Identity identity = new Identity(vo, broker);
          broker.clearCache();
          ConversionVO find_vo = (ConversionVO) broker.getObjectByIdentity(identity);
      }
  
      public static class FieldConversionConversionIdToInteger implements FieldConversion
      {
          public Object javaToSql(Object source) throws ConversionException
          {
              if (!(source instanceof ConversionId))
              {
                  throw new ConversionException(
                          "Wrong java field type when java-->sql, expected " +
                          ConversionId.class.getClass() + ", found "
                          + source.getClass());
              }
              return ((ConversionId) source).getConversionId();
          }
  
          public Object sqlToJava(Object source) throws ConversionException
          {
              if (!(source instanceof Integer))
              {
                  throw new ConversionException(
                          "Wrong java field type when java-->sql, expected java.lang.Integer,
found "
                          + source.getClass());
              }
              return new ConversionId((Integer) source);
          }
      }
  
      public static class FieldConversionLongToInteger implements FieldConversion
      {
          public Object javaToSql(Object source) throws ConversionException
          {
              if (!(source instanceof Long))
              {
                  throw new ConversionException(
                          "Wrong java field type when java-->sql, expected java.lang.Long,
found "
                          + source.getClass());
              }
              return new Integer(((Long) source).intValue());
          }
  
          public Object sqlToJava(Object source) throws ConversionException
          {
              if (!(source instanceof Integer))
              {
                  throw new ConversionException(
                          "Wrong java field type when java-->sql, expected java.lang.Integer,
found "
                          + source.getClass());
              }
              return new Long(((Integer) source).longValue());
          }
      }
  
      public static class ConversionId
      {
          private Integer conversionId;
  
          public ConversionId(Integer conversionId)
          {
              this.conversionId = conversionId;
          }
  
          public Integer getConversionId()
          {
              return conversionId;
          }
  
          public void setConversionId(Integer conversionId)
          {
              this.conversionId = conversionId;
          }
  
          public String toString()
          {
              return new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE).
                      append("conversionId", conversionId).toString();
          }
      }
  
      public static class ConversionVO
      {
          Long pkWithAutoIncrement;
          ConversionId pkWithoutAutoIncrement;
          Long normalWithAutoIncrement;
          ConversionId normalWithoutAutoIncrement;
  
          public ConversionVO()
          {
          }
  
          public ConversionVO(Long pkWithAutoIncrement, ConversionId pkWithoutAutoIncrement,
Long normalWithAutoIncrement, ConversionId normalWithoutAutoIncrement)
          {
              this.pkWithAutoIncrement = pkWithAutoIncrement;
              this.pkWithoutAutoIncrement = pkWithoutAutoIncrement;
              this.normalWithAutoIncrement = normalWithAutoIncrement;
              this.normalWithoutAutoIncrement = normalWithoutAutoIncrement;
          }
  
          public String toString()
          {
              return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
                      append("pkWithAutoIncrement", pkWithAutoIncrement).
                      append("pkWithoutAutoIncrement", pkWithoutAutoIncrement).
                      append("normalWithAutoIncrement", normalWithAutoIncrement).
                      append("normalWithoutAutoIncrement", normalWithoutAutoIncrement).toString();
          }
  
          public Long getPkWithAutoIncrement()
          {
              return pkWithAutoIncrement;
          }
  
          public void setPkWithAutoIncrement(Long pkWithAutoIncrement)
          {
              this.pkWithAutoIncrement = pkWithAutoIncrement;
          }
  
          public ConversionId getPkWithoutAutoIncrement()
          {
              return pkWithoutAutoIncrement;
          }
  
          public void setPkWithoutAutoIncrement(ConversionId pkWithoutAutoIncrement)
          {
              this.pkWithoutAutoIncrement = pkWithoutAutoIncrement;
          }
  
          public Long getNormalWithAutoIncrement()
          {
              return normalWithAutoIncrement;
          }
  
          public void setNormalWithAutoIncrement(Long normalWithAutoIncrement)
          {
              this.normalWithAutoIncrement = normalWithAutoIncrement;
          }
  
          public ConversionId getNormalWithoutAutoIncrement()
          {
              return normalWithoutAutoIncrement;
          }
  
          public void setNormalWithoutAutoIncrement(ConversionId normalWithoutAutoIncrement)
          {
              this.normalWithoutAutoIncrement = normalWithoutAutoIncrement;
          }
      }
  }
  
  
  
  1.4       +116 -11   db-ojb/src/test/org/apache/ojb/odmg/FieldConversion_ForeigenKeyTest.java
  
  Index: FieldConversion_ForeigenKeyTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/FieldConversion_ForeigenKeyTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FieldConversion_ForeigenKeyTest.java	19 Feb 2003 10:37:55 -0000	1.3
  +++ FieldConversion_ForeigenKeyTest.java	28 Feb 2003 12:37:05 -0000	1.4
  @@ -6,13 +6,16 @@
   package org.apache.ojb.odmg;
   
   import junit.framework.TestCase;
  +import org.apache.ojb.broker.TestHelper;
  +import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
  +import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
   import org.odmg.Database;
   import org.odmg.Implementation;
   import org.odmg.ODMGException;
  -import org.odmg.Transaction;
   import org.odmg.OQLQuery;
  -import org.apache.ojb.broker.TestHelper;
  +import org.odmg.Transaction;
   
  +import java.math.BigDecimal;
   import java.util.List;
   
   /**
  @@ -53,10 +56,10 @@
   
       public void testMakePersistentNode() throws Exception
       {
  -        String strQuery = "select allNodes from "+FieldConversion_Node.class.getName();
  +        String strQuery = "select allNodes from " + Node.class.getName();
           long id = System.currentTimeMillis();
  -        FieldConversion_Node node = new FieldConversion_Node(id, null, true);
  -        FieldConversion_Node child = new FieldConversion_Node(id + 1, node, false);
  +        Node node = new Node(id, null, true);
  +        Node child = new Node(id + 1, node, false);
   
   
           List result;
  @@ -83,7 +86,7 @@
           }
           finally
           {
  -            if(tx != null && tx.isOpen())
  +            if (tx != null && tx.isOpen())
               {
                   tx.abort();
               }
  @@ -98,10 +101,10 @@
   
       public void testLockNode() throws Exception
       {
  -        String strQuery = "select allNodes from "+FieldConversion_Node.class.getName();
  +        String strQuery = "select allNodes from " + Node.class.getName();
           long id = System.currentTimeMillis();
  -        FieldConversion_Node node = new FieldConversion_Node(id, null, true);
  -        FieldConversion_Node child = new FieldConversion_Node(id + 1, node, false);
  +        Node node = new Node(id, null, true);
  +        Node child = new Node(id + 1, node, false);
   
           Transaction tx = odmg.newTransaction();
           List result;
  @@ -126,7 +129,7 @@
           }
           finally
           {
  -            if(tx != null && tx.isOpen())
  +            if (tx != null && tx.isOpen())
               {
                   tx.abort();
               }
  @@ -136,5 +139,107 @@
   
           assertFalse(after == 0);
           assertEquals(before + 2, after);
  +    }
  +
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    public static class LongToBigDecimalConversion implements FieldConversion
  +    {
  +        public LongToBigDecimalConversion()
  +        {
  +        }
  +
  +        public Object javaToSql(Object source) throws ConversionException
  +        {
  +            Object ret;
  +            if (source instanceof Long)
  +            {
  +                ret = new BigDecimal(((Long) source).doubleValue());
  +            }
  +            else
  +            {
  +                ret = source;
  +            }
  +            return ret;
  +        }
  +
  +        public Object sqlToJava(Object source) throws ConversionException
  +        {
  +            Object ret;
  +            if (source instanceof BigDecimal)
  +            {
  +                ret = new Long(((BigDecimal) source).longValue());
  +            }
  +            else
  +            {
  +                ret = source;
  +            }
  +            return ret;
  +        }
  +    }
  +
  +
  +    //****************************************************************************
  +    // inner class
  +    //****************************************************************************
  +    public class Node
  +    {
  +        private long uid;  // primary key
  +        private long refId;
  +        private boolean nodeState;
  +        Node parent;
  +
  +        public Node()
  +        {
  +        }
  +
  +        public Node(long uid, Node parent, boolean nodeState)
  +        {
  +            this.uid = uid;
  +            this.parent = parent;
  +            this.nodeState = nodeState;
  +        }
  +
  +        public long getUid()
  +        {
  +            return uid;
  +        }
  +
  +        public void setUid(long uid)
  +        {
  +            this.uid = uid;
  +        }
  +
  +        public boolean isState()
  +        {
  +            return nodeState;
  +        }
  +
  +        public void setState(boolean state)
  +        {
  +            this.nodeState = state;
  +        }
  +
  +        public long getRefId()
  +        {
  +            return refId;
  +        }
  +
  +        public void setRefId(long refId)
  +        {
  +            this.refId = refId;
  +        }
  +
  +        public Node getParent()
  +        {
  +            return parent;
  +        }
  +
  +        public void setParent(Node parent)
  +        {
  +            this.parent = parent;
  +        }
       }
   }
  
  
  

Mime
View raw message