Package com.centraview.support.knowledgebase

Examples of com.centraview.support.knowledgebase.KnowledgeBaseLocalHome


  public int insertCategory(int userId, CategoryVO catinfo)
  {
    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

  public CategoryVO getCategory(int userId, int catId)
  {
    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

  public ArrayList getAllCategory(int userId)
  {
    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

  public KnowledgeVO getKB(int userId, int kbId)
  {
    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

  public int insertKB(int userId, KnowledgeVO kbinfo)
  {
    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

Related Classes of com.centraview.support.knowledgebase.KnowledgeBaseLocalHome

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.