Examples of array()


Examples of javax.persistence.criteria.CriteriaBuilder.array()

    em = factory.createEntityManager();
    em.getTransaction().begin();
    final CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<Object[]> q = cb.createQuery(Object[].class);
    Root<Customer> c = q.from(Customer.class);
    q.select( cb.array( c.get(Customer_.name), c.get(Customer_.age) ) );
    List<Object[]> result = em.createQuery(q).getResultList();
    assertEquals( 1, result.size() );
    assertEquals( c1.getName(), result.get( 0 )[0] );
    assertEquals( c1.getAge(), result.get( 0 )[1] );
    em.getTransaction().commit();
View Full Code Here

Examples of javolution.text.CharArray.array()

    public int getTextCharacters(int sourceStart, char[] target,
            int targetStart, int length) throws XMLStreamException {
        CharArray text = getText();
        int copyLength = Math.min(length, text.length());
        System.arraycopy(text.array(), sourceStart + text.offset(), target,
                targetStart, copyLength);
        return copyLength;
    }

    public int getTextLength() {
View Full Code Here

Examples of lombok.val.array()

    // read the first batch
    for (int i = 0; i < terminatorCharBuffer.length(); i++)
      tempCharBuffer.put(readCharacter(stream, streamEncoding));

    // compare and read next until arrays hold equal values
    while (!(StringUtils.sequenceEqual(terminatorCharBuffer.array(), tempCharBuffer.array())))
    {
      // read next char
      val ch = readCharacter(stream, streamEncoding);

      // left shift elements in array, throw away the first read
View Full Code Here

Examples of net.gleamynode.netty.array.ByteArrayOutputStream.array()

        ObjectOutputStream oout = new CompactObjectOutputStream(bout);
        oout.writeObject(obj);
        oout.flush();
        oout.close();
   
        ByteArray array = bout.array();
        writeInt(array.length());
        array.copyTo(this);
    }

    @Override
View Full Code Here

Examples of net.minecraft.util.io.netty.buffer.ByteBuf.array()

    protected ByteBuf a(ChannelHandlerContext channelhandlercontext, ByteBuf bytebuf) {
        int i = bytebuf.readableBytes();
        byte[] abyte = this.a(bytebuf);
        ByteBuf bytebuf1 = channelhandlercontext.alloc().heapBuffer(this.a.getOutputSize(i));

        bytebuf1.writerIndex(this.a.update(abyte, 0, i, bytebuf1.array(), bytebuf1.arrayOffset()));
        return bytebuf1;
    }

    protected void a(ByteBuf bytebuf, ByteBuf bytebuf1) {
        int i = bytebuf.readableBytes();
View Full Code Here

Examples of net.sf.json.util.JSONBuilder.array()

            JSONBuilder json = new JSONBuilder(outWriter);
            final List<LayerDescription> layers = description.getLayerDescriptions();
            json.object();
            json.key("version").value(description.getVersion());
            json.key("layerDescriptions");
            json.array();
            for (LayerDescription layer : layers) {
                json.object();
                json.key("layerName").value(layer.getName());
                URL url = layer.getOwsURL();
                json.key("owsURL").value(url != null ? url.toString() : "");
View Full Code Here

Examples of net.tomp2p.storage.AlternativeCompositeByteBuf.array()

    AlternativeCompositeByteBuf buf = AlternativeCompositeByteBuf.compBuffer(); // TODO what buffer to use?
   
    encoder.write(buf, m1, null);
   
    byte[] bytes = buf.array();
    writeToFile(bytes);
   
  }
 
  @Ignore
View Full Code Here

Examples of org.amplafi.json.JSONStringer.array()

                .endArray()
                .endObject()
                .toString());

            jj = new JSONStringer();
            jj.array();
            jj.value(1);
            jj.array();
            jj.value(null);
            jj.array();
            jj.object();
View Full Code Here

Examples of org.apache.hadoop.hbase.index.util.ByteArrayBuilder.array()

  @Override
  public int compareTo(byte[] actualValue, int offset, int length) {
    ByteArrayBuilder val = new ByteArrayBuilder(length);
    val.put(actualValue, offset, length);
    byte[] array = val.array();
    if (msb[0] == 0) {
      value[0] ^= (1 << 7);
      array[0] ^= (1 << 7);
    } else {
      value[0] ^= 0xff;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.util.JavaDataModel.array()

      double[] quantiles;           // the quantiles requested
      @Override
      public int estimate() {
        JavaDataModel model = JavaDataModel.get();
        return model.lengthFor(histogram) +
            model.array() + JavaDataModel.PRIMITIVES2 * quantiles.length;
      }
    };

    @Override
    public AggregationBuffer getNewAggregationBuffer() throws HiveException {
View Full Code Here
TOP
Copyright © 2015 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.