Package com.erudika.para.annotations

Examples of com.erudika.para.annotations.Indexed


   */
  public Object invoke(MethodInvocation mi) throws Throwable {
    Object result = null;
    Method m = mi.getMethod();
    Method superMethod = null;
    Indexed indexedAnno = null;
    Cached cachedAnno = null;
    String cn = getClass().getSimpleName();

    try {
      superMethod = DAO.class.getMethod(m.getName(), m.getParameterTypes());
      indexedAnno = Config.SEARCH_ENABLED ? superMethod.getAnnotation(Indexed.class) : null;
      cachedAnno = Config.CACHE_ENABLED ? superMethod.getAnnotation(Cached.class) : null;
    } catch (Exception e) {
      logger.error(null, e);
    }

    Object[] args = mi.getArguments();
    String appid = AOPUtils.getFirstArgOfString(args);

    if (indexedAnno != null) {
      switch (indexedAnno.action()) {
        case ADD:
          ParaObject addMe = AOPUtils.getArgOfParaObject(args);
          if (Utils.isValidObject(addMe)) {
            result = mi.proceed();
            search.index(appid, addMe);
View Full Code Here


  @SuppressWarnings("unchecked")
  public Object invoke(MethodInvocation mi) throws Throwable {
    Object result = null;
    Method m = mi.getMethod();
    Method superMethod = null;
    Indexed indexedAnno = null;
    Cached cachedAnno = null;
    String cn = getClass().getSimpleName();

    try {
      superMethod = DAO.class.getMethod(m.getName(), m.getParameterTypes());
      indexedAnno = Config.SEARCH_ENABLED ? superMethod.getAnnotation(Indexed.class) : null;
      cachedAnno = Config.CACHE_ENABLED ? superMethod.getAnnotation(Cached.class) : null;
    } catch (Exception e) {
      logger.error(null, e);
    }

    Object[] args = mi.getArguments();
    String appid = AOPUtils.getFirstArgOfString(args);

    if (indexedAnno != null) {
      switch (indexedAnno.action()) {
        case ADD:
          ParaObject addMe = AOPUtils.getArgOfParaObject(args);
          if (Utils.isValidObject(addMe)) {
            result = mi.proceed();
            search.index(appid, addMe);
View Full Code Here

  @SuppressWarnings("unchecked")
  public Object invoke(MethodInvocation mi) throws Throwable {
    Object result = null;
    Method m = mi.getMethod();
    Method superMethod = null;
    Indexed indexedAnno = null;
    Cached cachedAnno = null;
    String cn = getClass().getSimpleName();

    try {
      superMethod = DAO.class.getMethod(m.getName(), m.getParameterTypes());
      indexedAnno = Config.SEARCH_ENABLED ? superMethod.getAnnotation(Indexed.class) : null;
      cachedAnno = Config.CACHE_ENABLED ? superMethod.getAnnotation(Cached.class) : null;
    } catch (Exception e) {
      logger.error(null, e);
    }

    Object[] args = mi.getArguments();
    String appid = AOPUtils.getFirstArgOfString(args);

    if (indexedAnno != null) {
      switch (indexedAnno.action()) {
        case ADD:
          ParaObject addMe = AOPUtils.getArgOfParaObject(args);
          if (Utils.isValidObject(addMe)) {
            result = mi.proceed();
            search.index(appid, addMe);
View Full Code Here

  @SuppressWarnings("unchecked")
  public Object invoke(MethodInvocation mi) throws Throwable {
    Object result = null;
    Method m = mi.getMethod();
    Method superMethod = null;
    Indexed indexedAnno = null;
    Cached cachedAnno = null;
    String cn = getClass().getSimpleName();

    try {
      superMethod = DAO.class.getMethod(m.getName(), m.getParameterTypes());
      indexedAnno = Config.SEARCH_ENABLED ? superMethod.getAnnotation(Indexed.class) : null;
      cachedAnno = Config.CACHE_ENABLED ? superMethod.getAnnotation(Cached.class) : null;
    } catch (Exception e) {
      logger.error(null, e);
    }

//      result = indexingAction(mi, indexedAnno);
    Object[] args = mi.getArguments();
    String appid = AOPUtils.getFirstArgOfString(args);

    if (indexedAnno != null) {
      switch (indexedAnno.action()) {
        case ADD:
          ParaObject addMe = AOPUtils.getArgOfParaObject(args);
          if (Utils.isValidObject(addMe)) {
            result = mi.proceed();
            search.index(appid, addMe);
View Full Code Here

TOP

Related Classes of com.erudika.para.annotations.Indexed

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.