If not already created, a new <code>ejb-ref</code> element will be created and returned.
Otherwise, the first existing <code>ejb-ref</code> element will be returned.
@return the instance defined for the element <code>ejb-ref</code>
1692
public EjbRefType<WebFragmentType<T>> getOrCreateEjbRef()
   {
      List<Node> nodeList = childNode.get("ejb-ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new EjbRefTypeImpl<WebFragmentType<T>>(this, "ejb-ref", childNode, nodeList.get(0));
      }
      return createEjbRef();
   }
782056
public BatchArtifactRef<BatchXMLDescriptor> getOrCreateRef()
   {
      List<Node> nodeList = model.get("ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new BatchArtifactRefImpl<BatchXMLDescriptor>(this, "ref", model, nodeList.get(0));
      }
      return createRef();
   }
1290652
public ServiceRefType<WebAppDescriptor> getOrCreateServiceRef()
   {
      List<Node> nodeList = model.get("service-ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ServiceRefTypeImpl<WebAppDescriptor>(this, "service-ref", model, nodeList.get(0));
      }
      return createServiceRef();
   }
591490
public Instance getInstance() {
        DescribeInstancesRequest req = new DescribeInstancesRequest();
        req.setInstanceIds(Collections.singleton(this.getInstanceId()));
        DescribeInstancesResult result = this.ec2Client.describeInstances(req);
        if (result.getReservations().size() != 1) {
            throw new IllegalStateException("Found multiple instances");
        }
        List<Instance> instances = result.getReservations().get(0).getInstances();
        if (instances.size() != 1) {
            throw new IllegalStateException("Found multiple instances");
        }
        return instances.get(0);
    }
51185
public T one() {
        this.beforeCheck();

        String sql = this.buildSelectSQL(true);

        T model = this.queryOne(modelClass, sql, paramValues);

        ifThen(null != model && null != joinParams,
                () -> this.setJoin(Collections.singletonList(model)));

        return model;
    }
745131
public Iterator<E> iterator() {
		
		final Iterator<E> it = new Iterator<E>() {

			@Override
			public boolean hasNext() {
				
				return (index < size()); 
			}

			@Override
			public E next() {
				final E elem = get(index++);
				
				if (index >= size() && nextLink != null) {
					getNextPage();
				}
				
				return elem;
			}

			@Override
			public void remove() {
				// TODO Auto-generated method stub
			}
		};
		return it;

		// return super.iterator();
	}
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
92359
public static InterceptorFactory getInstance()
	{
		if (instance == null)
		{
			instance = new InterceptorFactory();
			OjbConfigurator.getInstance().configure(instance);
		}
		return instance;
	}
1335177
private T getOrCreate() throws E {
    try {
      T client = elements.poll();
      // a client was available, all good. otherwise, create one
      if (client != null) {
        return client;
      }
      return create();
    } catch (Exception e) {
      // if an exception is thrown after acquiring the semaphore, release the
      // semaphore before propagating the exception
      semaphore.release();
      throw e;
    }
  }
251161
public static WebElementFinder create() {
		return new WebElementFinder(null, null, 0L, 0L, null, null, null, null, false);
	}
567004
public java.lang.String getNewValue() {
    java.lang.Object ref = newValue_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      newValue_ = s;
      return s;
    }
  }
587258
@Override
    public RandomElementReader duplicate() {
        if (closed) {
            throw new IllegalStateException("Reader is closed.");
        }

        return new RandomElementReader() {

            private boolean closed = false;
            private int nextElement = 0;

            @Override
            public Element readElement(int index) throws IOException {
                if (closed) {
                    throw new IllegalStateException("Reader closed");
                }
                return BufferedElementReader.this.readElement(index);
            }

            @Override
            public ElementType getElementType() {
                return BufferedElementReader.this.getElementType();
            }

            @Override
            public int getCount() {
                return BufferedElementReader.this.getCount();
            }

            @Override
            public Element readElement() throws IOException {

                if (nextElement >= getCount()) {
                    return null;
                }
                if (closed) {
                    throw new IllegalStateException("Reader closed");
                }
                return BufferedElementReader.this.readElement(nextElement++);
            }

            @Override
            public void close() throws IOException {
                closed = true;
            }

            @Override
            public RandomElementReader duplicate() {
                return BufferedElementReader.this.duplicate();
            }

            @Override
            public boolean isClosed() {
                return closed;
            }
        };
    }
577529
public java.lang.String getCreatedBy() {
    java.lang.Object ref = createdBy_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      createdBy_ = s;
      return s;
    }
  }
669713
public T nextElement() {
        T rc = null;
        if (null == this.myIterator) {
            rc = this.singleton;
            this.singleton = null;
        } else {
            rc = this.myIterator.next();
        }
        return rc;
    }
901223
public SessionBeanType<EnterpriseBeansType<T>> getOrCreateSession()
   {
      List<Node> nodeList = childNode.get("session");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new SessionBeanTypeImpl<EnterpriseBeansType<T>>(this, "session", childNode, nodeList.get(0));
      }
      return createSession();
   }
83748
public String getBeanDefinitionQualifiedClassName() {
        String newClassName = beanDefinitionName;
        if (newClassName.endsWith("[]")) {
            newClassName = newClassName.substring(0, newClassName.length() - 2);
        }
        return newClassName + REF_SUFFIX;
    }
468254
protected int storeReference(Object obj) {
        int newRefId = refId.getAndIncrement();
        //log.trace("storeReference - ref id: {} obj: {}", newRefId, obj);
        refMap.put(Integer.valueOf(newRefId), obj);
        return newRefId;
    }