Examples of CommentImpl


Examples of eu.planets_project.tb.impl.model.CommentImpl

    test_find1 =  dao_r.findComment(commentID1);
    assertEquals("Title1",test_find1.getTitle())
  }
 
  public void testEJBEntityMerged(){
    CommentImpl test_find1 =  dao_r.findComment(commentID1);
    //modify the bean
    long l1 = 12;
    test_find1.setTitle("Title1");
    test_find1.setExperimentID(l1);
    dao_r.updateComment(test_find1);
    //Test1: updating existing entity
    assertEquals("Title1",test_find1.getTitle());
   
    //Test2: checking if merging entity works
    test_find1 =  dao_r.findComment(commentID1);
    test_find1.setTitle("TitleUpdated");
    dao_r.updateComment(test_find1);
   
    test_find1 =  dao_r.findComment(commentID1);
    assertEquals(l1,test_find1.getExperimentID())
    assertEquals("TitleUpdated",test_find1.getTitle())
  }
View Full Code Here

Examples of eu.planets_project.tb.impl.model.CommentImpl

  }
 
  //Tests for the underlying Entity Bean's methods setter and getter's without any EJB issues
  public void testAddChildComment(){
    //TODO: Add CommentManager registration
    CommentImpl test_find1 =  dao_r.findComment(commentID1);
    System.out.println("Comment Partent ID: "+test_find1.getCommentID());
    CommentImpl com_child = new CommentImpl(test_find1.getCommentID());
    com_child.setComment("Andrew", "TestChild", "Comment Text");
    dao_r.persistComment(com_child);

    test_find1 =  dao_r.findComment(commentID1);
    System.out.println("Comment Partent ID: "+test_find1.getCommentID());
    System.out.println("Comment Child ID: "+com_child.getCommentID());
   
    Vector<Comment> vChilds = (Vector<Comment>)test_find1.getReplies();
   
    assertEquals(1,vChilds.size())
   
View Full Code Here

Examples of eu.planets_project.tb.impl.model.CommentImpl

            return null;
        }
    }
   
    public void deleteComment(long id) {
        CommentImpl t_helper = manager.find(CommentImpl.class, id);
        manager.remove(t_helper);
    }
View Full Code Here

Examples of eu.planets_project.tb.impl.model.CommentImpl

        CommentImpl t_helper = manager.find(CommentImpl.class, id);
        manager.remove(t_helper);
    }

    public void deleteComment(Comment comment) {
        CommentImpl t_helper = manager.find(CommentImpl.class, comment.getCommentID());
        manager.remove(t_helper);
    }
View Full Code Here

Examples of mf.org.apache.xerces.stax.events.CommentImpl

            EntityDeclaration declaration) {
        return new EntityReferenceImpl(name, declaration, fLocation);
    }
   
    public Comment createComment(String text) {
        return new CommentImpl(text, fLocation);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.CommentImpl

    public OMComment createOMComment(OMContainer parent, String content) {
        return createOMComment(parent, content, false);
    }
   
    public OMComment createOMComment(OMContainer parent, String content, boolean fromBuilder) {
        CommentImpl comment = new CommentImpl(content, this);
        if (parent != null) {
            ((OMContainerEx)parent).addChild(comment, fromBuilder);
        }
        return comment;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.CommentImpl

                return newPI;
            }
            case (OMNode.COMMENT_NODE): {
                OMComment importedComment = (OMComment) child;
                OMComment newComment = createOMComment(null, importedComment.getValue());
                newComment = new CommentImpl(importedComment.getValue(), this);
                return newComment;
            }
            case (OMNode.DTD_NODE): {
                OMDocType importedDocType = (OMDocType) child;
                return createOMDocType(null, importedDocType.getRootName(),
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.CommentImpl

        parent.addChild(pi);
        return pi;
    }

    public OMComment createOMComment(OMContainer parent, String content) {
        CommentImpl comment = new CommentImpl(getDocumentFromParent(parent), content, this);
        parent.addChild(comment);
        return comment;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.CommentImpl

            doc = (DocumentImpl) parent;
        } else {
            doc = (DocumentImpl) ((ParentNode) parent).getOwnerDocument();
        }

        CommentImpl comment = new CommentImpl(doc, content, this);
        parent.addChild(comment);
        return comment;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.CommentImpl

            doc = (DocumentImpl) parent;
        } else {
            doc = (DocumentImpl) ((ParentNode) parent).getOwnerDocument();
        }

        CommentImpl comment = new CommentImpl(doc, content, this);
        parent.addChild(comment);
        return comment;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.