Examples of AttributeHolder


Examples of com.avaje.tests.model.basic.AttributeHolder

    final ListAttributeValue value1_DB = listAttributeDB.getValues().iterator().next();
    Assert.assertTrue(value1.getId().equals(value1_DB.getId()));
    logger.info(" -- asserted data in db");
   
   
    final AttributeHolder holder = new AttributeHolder();
    holder.add(listAttributeDB);
   
    Ebean.save(holder);
    logger.info(" -- saved holder");
   
    // Now change the M2M listAttribute.values and save the holder
View Full Code Here

Examples of com.avaje.tests.model.basic.AttributeHolder

    listAttribute.add(value1);
    Ebean.save(listAttribute);
   
   
   
    final AttributeHolder holder = new AttributeHolder();
    holder.add(listAttribute);
   
    try {
      Ebean.execute(new TxRunnable() {
        public void run() {
            //Ebean.currentTransaction().log("-- saving holder first time");
View Full Code Here

Examples of com.sun.faces.config.beans.AttributeHolder

            top = (AttributeBean) digester.pop();
        } catch (Exception e) {
            throw new IllegalStateException("Popped object is not a " +
                                            CLASS_NAME + " instance");
        }
        AttributeHolder ah = (AttributeHolder) digester.peek();
        AttributeBean old = ah.getAttribute(top.getAttributeName());
        if (old == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[AttributeRule]{" +
                                           digester.getMatch() +
                                           "} New(" +
                                           top.getAttributeName() +
                                           ")");
            }
            ah.addAttribute(top);
        } else {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[AttributeRule]{" +
                                          digester.getMatch() +
                                          "} Merge(" +
View Full Code Here

Examples of com.sun.faces.config.beans.AttributeHolder

            top = (AttributeBean) digester.pop();
        } catch (Exception e) {
            throw new IllegalStateException("Popped object is not a " +
                                            CLASS_NAME + " instance");
        }
        AttributeHolder ah = (AttributeHolder) digester.peek();
        AttributeBean old = ah.getAttribute(top.getAttributeName());
        if (old == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[AttributeRule]{" +
                                           digester.getMatch() +
                                           "} New(" +
                                           top.getAttributeName() +
                                           ")");
            }
            ah.addAttribute(top);
        } else {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[AttributeRule]{" +
                                          digester.getMatch() +
                                          "} Merge(" +
View Full Code Here

Examples of com.sun.grizzly.util.AttributeHolder

    }

    private StompProtocolHandler getStompProtocolHandler(Context ctx) {

        StompProtocolHandler sph = null;
        AttributeHolder attr = ctx.getAttributeHolderByScope(Context.AttributeScope.CONNECTION);
        if (attr == null) {
            WorkerThread workerThread = (WorkerThread)Thread.currentThread();
            attr = workerThread.getAttachment();
            ctx.getSelectionKey().attach(attr);
        }
        sph = (StompProtocolHandler)attr.getAttribute(STOMP_PROTOCOL_HANDLER_ATTR);
        if (sph == null) {
            sph = new StompProtocolHandler(_bc, _jmsprop);
            attr.setAttribute(STOMP_PROTOCOL_HANDLER_ATTR, sph);
        }
        return sph;
    }
View Full Code Here

Examples of com.sun.grizzly.util.AttributeHolder

                StompBridgeResources.I_SELECTION_KEY_LOCAL_CLOSED, (key == null ? "":key.toString())));
        if (key == null) return;
        Object o = key.attachment();

        if (o instanceof AttributeHolder) {
            AttributeHolder attr = (AttributeHolder)o;
            StompProtocolHandler sph = (StompProtocolHandler)attr.getAttribute(
                                        StompProtocolFilter.STOMP_PROTOCOL_HANDLER_ATTR);
            if (sph != null) {
                _logger.log(Level.INFO, getStompBridgeResources().getString(
                            StompBridgeResources.I_CLOSE_STOMP_HANDLER,
                            (sph == null ?"":sph.toString()), (key == null ? "":key.toString())));
View Full Code Here

Examples of com.sun.grizzly.util.AttributeHolder

                StompBridgeResources.I_SELECTION_KEY_REMOTE_CLOSED, (key == null ? "":key.toString())));
        if (key == null) return;

        Object o = key.attachment();
        if (o instanceof AttributeHolder) {
            AttributeHolder attr = (AttributeHolder)o;
            StompProtocolHandler sph = (StompProtocolHandler)attr.getAttribute(
                                        StompProtocolFilter.STOMP_PROTOCOL_HANDLER_ATTR);
            if (sph != null) {
                _logger.log(Level.INFO, getStompBridgeResources().getString(
                            StompBridgeResources.I_CLOSE_STOMP_HANDLER,
                            (sph == null ?"":sph.toString()), (key == null ? "":key.toString())));
View Full Code Here

Examples of org.apache.derby.impl.tools.ij.AttributeHolder

    }
  }
  public void check(){
    Enumeration e = attributes.elements();
    while (e.hasMoreElements()) {
      AttributeHolder anAttribute = (AttributeHolder)e.nextElement();
      //The check for duplicate must be done at the URLCheck level
      //and not by each specific attribute.  Only URLCheck knowns about
      //all of the attributes and names.
      checkForDuplicate(anAttribute);
      //Have each attribute check as much about themself as possible.
      anAttribute.check( validProps);
    }
  }
View Full Code Here

Examples of org.apache.derby.impl.tools.ij.AttributeHolder

    }
  }
  public void checkForDuplicate(AttributeHolder anAttribute){
    Enumeration e = attributes.elements();
    while (e.hasMoreElements()) {
      AttributeHolder aHolder = (AttributeHolder)e.nextElement();
      //If a duplicate is found, make sure that the message is only shown
      //once for each attribute.
      if (anAttribute != aHolder && anAttribute.getName().equals(aHolder.getName())) {
        anAttribute.addError(langUtil.getTextMessage("TL_dupAtt"));
      }
    }

  }
View Full Code Here

Examples of org.apache.derby.impl.tools.ij.AttributeHolder

   
    //Parse the url into attributes and put them in a Properties object.
    StringTokenizer st = new StringTokenizer(url.substring(protocol.length()), ";:\"");
    attributes = new Vector();
    while (st.hasMoreTokens()) {
      AttributeHolder anAttribute = new AttributeHolder();
      String anAtt = "";
      String aValue = "";
    String aToken = st.nextToken();
      //The "=" is the seperator between key and value.
    int eqPos = aToken.indexOf('=');
    if (eqPos == -1) {
      //If there is no "=" this is not an attribute
      continue;
      }
      else {
        anAtt = (aToken.substring(0, eqPos)).trim();
        aValue = (aToken.substring(eqPos + 1)).trim();

      }
      anAttribute.setName(anAtt);
      anAttribute.setValue(aValue);
      anAttribute.setToken(aToken);
      attributes.addElement(anAttribute);
      props.put(anAtt, aToken);
  }
    return props;
  }
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.