Examples of List


Examples of org.hibernate.mapping.List

          this.collection,
          StringHelper.qualify( this.collection.getRole(), "key" ),
          (XClass) null,
          (XProperty) null, propertyHolder, mappings
      );
      List list = (List) this.collection;
      if ( !list.isOneToMany() ) indexColumn.forceNotNull();
      indexColumn.setPropertyHolder( valueHolder );
      SimpleValueBinder value = new SimpleValueBinder();
      value.setColumns( new Ejb3Column[] { indexColumn } );
      value.setExplicitType( "integer" );
      value.setMappings( mappings );
      SimpleValue indexValue = value.make();
      indexColumn.linkWithValue( indexValue );
      list.setIndex( indexValue );
      list.setBaseIndex( indexColumn.getBase() );
      if ( list.isOneToMany() && !list.getKey().isNullable() && !list.isInverse() ) {
        String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
        PersistentClass referenced = mappings.getClass( entityName );
        IndexBackref ib = new IndexBackref();
        ib.setName( '_' + propertyName + "IndexBackref" );
        ib.setUpdateable( false );
        ib.setSelectable( false );
        ib.setCollectionRole( list.getRole() );
        ib.setEntityName( list.getOwner().getEntityName() );
        ib.setValue( list.getIndex() );
        referenced.addProperty( ib );
      }
    }
    else {
      Collection coll = this.collection;
View Full Code Here

Examples of org.jgroups.util.List

  RspList     rsp_list;
  FlushRsp    retval=new FlushRsp();
  Digest      digest;
  long[]      min, max;
  long[]      lower[];
  List        unstable_msgs=new List();
  boolean     get_lower_msgs=false;

  highest_delivered_msgs=new long[members.size()];
  min=new long[members.size()];
  max=new long[members.size()];


  /* Determine the highest seqno (for each member) that was delivered to the application
     (i.e., consumed by the application). Stores result in array 'highest_delivered_msgs' */
  getHighestDeliveredSeqnos();

  for(int i=0; i < highest_delivered_msgs.length; i++)
      min[i]=max[i]=highest_delivered_msgs[i];


  /* Call the handleFlush() method of all existing members. The highest seqnos seen by the coord
     is the argument */
   if(log.isInfoEnabled()) log.info("calling handleFlush(" + dests + ')');
  passDown(new Event(Event.SWITCH_OUT_OF_BAND)); // we need out-of-band control for FLUSH ...
  MethodCall call = new MethodCall("handleFlush", new Object[] {dests, highest_delivered_msgs.clone()},
    new String[] {Vector.class.getName(), long[].class.getName()});
  rsp_list=callRemoteMethods(dests, call, GroupRequest.GET_ALL, 0);
   if(log.isInfoEnabled()) log.info("flush done");


  /* Process all the responses (Digest): compute a range of messages (min and max seqno) for each
     member that has to be re-broadcast; FlushRsp contains those messages. They will be re-braodcast
     by the cordinator (in the GMS protocol). */
  for(int i=0; i < rsp_list.size(); i++) {
      Rsp rsp=(Rsp)rsp_list.elementAt(i);
      if(rsp.wasReceived()) {
    digest=(Digest)rsp.getValue();
    if(digest != null) {
        for(int j=0; j < digest.highest_seqnos.length && j < min.length; j++) {
      min[j]=Math.min(min[j], digest.highest_seqnos[j]);
      max[j]=Math.max(max[j], digest.highest_seqnos[j]);
        }
        if(digest.msgs.size() > 0) {
      for(Enumeration e=digest.msgs.elements(); e.hasMoreElements();)
          unstable_msgs.add(e.nextElement());
        }
    }
      }
  } // end for-loop



  /* If any of the highest msgs of the flush replies were lower than the ones sent by this
     coordinator, we have to re-broadcast them. (This won't occur often)
     Compute the range between min and highest_delivered_msgs */
  lower=new long[min.length][]; // stores (for each mbr) the range of seqnos (e.g. 20 24): send msgs
              // 21, 22 and 23 and 24 (excluding lower and including upper range)

  for(int i=0; i < min.length; i++) {
      if(min[i] < highest_delivered_msgs[i]) {    // will almost never be the case
    lower[i]=new long[2];
    lower[i][0]=min[i];                     // lower boundary (excluding)
    lower[i][1]=highest_delivered_msgs[i]// upper boundary (including)
    get_lower_msgs=true;
      }
  }
  if(get_lower_msgs) {
      get_msgs=null;
      synchronized(get_msgs_mutex) {
    passDown(new Event(Event.GET_MSGS, lower));
    try {
        get_msgs_mutex.wait(get_msgs_timeout);
    }
    catch(Exception e) {}
      }
      if(get_msgs != null) {
    for(Enumeration e=get_msgs.elements(); e.hasMoreElements();)
        unstable_msgs.add(e.nextElement());
      }
  }
  retval.unstable_msgs=unstable_msgs.getContents();
  if(rsp_list.numSuspectedMembers() > 0) {
      retval.result=false;
      retval.failed_mbrs=rsp_list.getSuspectedMembers();
  }

View Full Code Here

Examples of org.odftoolkit.simple.text.list.List

      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator outLineDecorator = new OutLineDecorator(doc);
      String[] subItemContents = { "sub list item 1", "sub list item 2",
          "sub list item 3" };

      List list1 = new List(sect);
      boolean removeResult = sect.removeList(list1);
      Assert.assertTrue(removeResult);

      List list2 = new List(sect, numberDecorator);
      list2.addItems(subItemContents);
      Assert.assertEquals(ListDecorator.ListType.NUMBER, list2.getType());
      removeResult = sect.removeList(list2);
      Assert.assertTrue(removeResult);

      List list3 = new List(sect, "Bullet List", null);
      list3.addItems(subItemContents);
      Assert.assertEquals(ListDecorator.ListType.BULLET, list3.getType());
      removeResult = sect.removeList(list3);
      Assert.assertTrue(removeResult);

      List list4 = sect.addList();
      removeResult = sect.removeList(list4);
      Assert.assertTrue(removeResult);

      List list5 = sect.addList(outLineDecorator);
      list5.addItems(subItemContents);
      Assert.assertEquals(ListDecorator.ListType.NUMBER, list5.getType());
      removeResult = sect.removeList(list5);
      Assert.assertTrue(removeResult);
    } catch (Exception e) {
      Logger.getLogger(ListTest.class.getName()).log(Level.SEVERE, null,
          e);
View Full Code Here

Examples of org.omegahat.Environment.Parser.Parse.List

  /**
     Construct an object that will convert the names
     to objects by looking up the databases.
   */
public List argsToList(String[] names) {
List l = null;
if(names == null || names.length < 1)
   return(new List()); // currently necessary, but the expressions should handle null arguments.

int n = names.length;
  l = new List(n);
for(int i = 0; i < n; i++)
   l.addElement(new Name(names[i]));

return(l);
}
View Full Code Here

Examples of org.ontoware.rdfreactor.schema.rdfs.List

    Model model = repositoryModelFactory.createModel();
    model.open();

    URI a = new URIImpl("urn:test:a");
    URI b = new URIImpl("urn:test:b");
    List list = new List(model, "urn:test:list", true);
   
    //assertTrue( list instanceof URI );  --> fails

    model.addStatement(a, b, list.asURI() );
    model.close();
  }
View Full Code Here

Examples of org.openhab.model.sitemap.List

        Slider sliderWidget = (Slider) widget;
        bean.sendFrequency = sliderWidget.getFrequency();
        bean.switchSupport = sliderWidget.isSwitchEnabled();
      }
      if(widget instanceof List) {
        List listWidget = (List) widget;
        bean.separator = listWidget.getSeparator();
      }
      if (widget instanceof Image ||
        widget instanceof Video ||
        widget instanceof Webview) {
View Full Code Here

Examples of org.openntf.domino.nsfdata.structs.LIST

      ByteBuffer data = getData().duplicate();
      data.order(ByteOrder.LITTLE_ENDIAN);
      data.position(data.position() + 32 + preceding);
      data.limit(data.position() + 2);
      LIST list = new LIST(data);
      int listEntries = list.getListEntries() & 0xFFFF;

      data = getData().duplicate();
      data.order(ByteOrder.LITTLE_ENDIAN);
      data.position(data.position() + 32 + preceding + 2);
      if (listEntries == 0 && totalLength > 2) {
View Full Code Here

Examples of org.openqa.jetty.html.List

        form.add(new Input(Input.Submit,"A","Exit All Servers"));
        page.add(form);
        page.add(Break.rule);
        page.add(new Heading(3,"Components:"));

        List sList=new List(List.Ordered);
        page.add(sList);
       
        String id1;
        int i1=0;
        Iterator s=_servers.iterator();
        while(s.hasNext())
        {
            id1=""+i1++;
            HttpServer server=(HttpServer)s.next();           
            Composite sItem = sList.newItem();
            sItem.add("<B>HttpServer&nbsp;");
            sItem.add(lifeCycle(request,id1,server));
            sItem.add("</B>");
            sItem.add(Break.line);
            sItem.add("<B>Listeners:</B>");
            List lList=new List(List.Unordered);
            sItem.add(lList);

            HttpListener[] listeners=server.getListeners();
            for (int i2=0;i2<listeners.length;i2++)
            {
                HttpListener listener = listeners[i2];
                String id2=id1+":"+listener;
                lList.add(lifeCycle(request,id2,listener));
            }

            Map hostMap = server.getHostMap();
           
            sItem.add("<B>Contexts:</B>");
            List hcList=new List(List.Unordered);
            sItem.add(hcList);
            Iterator i2=hostMap.entrySet().iterator();
            while(i2.hasNext())
            {
                Map.Entry hEntry=(Map.Entry)(i2.next());
                String host=(String)hEntry.getKey();

                PathMap contexts=(PathMap)hEntry.getValue();
                Iterator i3=contexts.entrySet().iterator();
                while(i3.hasNext())
                {
                    Map.Entry cEntry=(Map.Entry)(i3.next());
                    String contextPath=(String)cEntry.getKey();
                    java.util.List contextList=(java.util.List)cEntry.getValue();
                   
                    Composite hcItem = hcList.newItem();
                    if (host!=null)
                        hcItem.add("Host="+host+":");
                    hcItem.add("ContextPath="+contextPath);
                   
                    String id3=id1+":"+host+":"+
                        (contextPath.length()>2
                         ?contextPath.substring(0,contextPath.length()-2)
                         :contextPath);
                   
                    List cList=new List(List.Ordered);
                    hcItem.add(cList);
                    for (int i4=0;i4<contextList.size();i4++)
                    {
                        String id4=id3+":"+i4;
                        Composite cItem = cList.newItem();
                        HttpContext hc=
                            (HttpContext)contextList.get(i4);
                        cItem.add(lifeCycle(request,id4,hc));
                        cItem.add("<BR>ResourceBase="+hc.getResourceBase());
                        cItem.add("<BR>ClassPath="+hc.getClassPath());

                   
                        List hList=new List(List.Ordered);
                        cItem.add(hList);
                        int handlers = hc.getHandlers().length;
                        for(int i5=0;i5<handlers;i5++)
                        {
                            String id5=id4+":"+i5;
                            HttpHandler handler = hc.getHandlers()[i5];
                            Composite hItem=hList.newItem();
                            hItem.add(lifeCycle(request,
                                                id5,
                                                handler,
                                                handler.getName()));
                            if (handler instanceof ServletHandler)
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.List

            case JJTLIST:
                if (stack.nodeArity() > 0 && stack.peekNode() instanceof ComprehensionCollection) {
                    ComprehensionCollection col = (ComprehensionCollection) stack.popNode();
                    return new ListComp(((exprType) stack.popNode()), col.getGenerators(), ListComp.ListCtx);
                }
                return new List(makeExprs(), List.Load);
            case JJTSET:
                return new Set(null);
            case JJTDICTIONARY:
                return makeDictionaryOrSet(arity);
            case JJTSTR_1OP:
View Full Code Here

Examples of project.entities.institute.List

public class ListDAOImpl extends HibernateDaoSupport implements ListDAO {

  @Override
  public List createList(int progressBook, int student, float value) {
    List list = new List(progressBook, student, value);
    return (List) getHibernateTemplate().save(list);
  }
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.