Package com.centraview.support.knowledgebase

Examples of com.centraview.support.knowledgebase.KnowledgeBaseLocalHome.create()


  {
    int cat = 0;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      cat = remote.insertCategory(userId, catinfo);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
View Full Code Here


  public void updateCategory(int userId, CategoryVO catinfo) throws KBException
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.updateCategory(userId, catinfo);
    } catch (KBException kbe) {
      throw kbe;
    } catch (Exception e) {
View Full Code Here

  public int deleteCategory(int userId, int categoryId)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.deleteCategory(userId, categoryId);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
View Full Code Here

  {
    CategoryVO catVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      catVO = remote.getCategory(userId, catId);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
View Full Code Here

  {
    ArrayList categoryList = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal local = home.create();
      local.setDataSource(this.dataSource);
      categoryList = local.getAllCategory(userId);
    } catch (Exception e) {
      logger.error("[getAllCategory]: Exception", e);
    }
View Full Code Here

  public void deleteAllKB(int userId)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal local = home.create();
      local.setDataSource(this.dataSource);
      local.deleteAllKB(userId);
    } catch (Exception e) {
      logger.error("[deleteAllKB]: Exception", e);
    }
View Full Code Here

  public void deleteKB(int userId, int knId)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal local = home.create();
      local.setDataSource(this.dataSource);
      local.deleteKB(userId, knId);
    } catch (Exception e) {
      logger.error("[deleteKB]: Exception", e);
    }
View Full Code Here

  {
    KnowledgeVO kVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      kVO = remote.getKB(userId, kbId);
    } catch (Exception e) {
      logger.error("[getKB]: Exception", e);
    }
View Full Code Here

  {
    int kbid = 0;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      kbid = remote.insertKB(userId, kbinfo);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
View Full Code Here

  public void updateKB(int userId, KnowledgeVO kbinfo)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      KnowledgeBaseLocalHome home = (KnowledgeBaseLocalHome) ic.lookup("local/KnowledgeBase");
      KnowledgeBaseLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.updateKB(userId, kbinfo);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
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.