Return an enumeration instance that wraps the given enumeration
of primary keys. <p>

This helper method is used to construct the result enumeration
for finder methods on homes that contain container managed entity
beans. <p>
777115
@Override
    @SuppressWarnings("rawtypes")
    public Enumeration getEnumeration(Finder finder)
                    throws FinderException,
                    RemoteException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "getEnumeration(EJSFinder)");

        homeEnabled();

        final ContainerTx currentTx = container.getCurrentContainerTx();//d171654
        Enumeration rtnEnum =
                        container.persisterFactory.wrapResultsInEnumeration(currentTx,
                                                                            this,
                                                                            finder);
        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "getEnumeration");

        return rtnEnum;
    }
1304829
public static <T extends ModifierReviewable.OfEnumeration> ElementMatcher.Junction<T> isEnum() {
        return new ModifierMatcher<T>(ModifierMatcher.Mode.ENUMERATION);
    }
131858
public TableKeysAndAttributes withPrimaryKeys(PrimaryKey... primaryKeys) {
        if (primaryKeys == null)
            this.primaryKeys = null;
        else {
            Set<String> pkNameSet = null;
            for (PrimaryKey pk : primaryKeys) {
                if (pkNameSet == null)
                    pkNameSet = pk.getComponentNameSet();
                else {
                    if (!pkNameSet.equals(pk.getComponentNameSet())) {
                        throw new IllegalArgumentException(
                            "primary key attribute names must be consistent for the specified primary keys");
                    }
                }
            }
            this.primaryKeys = new ArrayList<PrimaryKey>(Arrays.asList(primaryKeys));
        }
        return this;
    }
418286
public Object getPrimaryKey() throws javax.ejb.EJBException
    {
        HomeInternal hi = beanId.getHome();

        if (hi.isStatelessSessionHome() || hi.isStatefulSessionHome()) {
            throw new IllegalSessionMethodLocalException();
        }

        //PK26539: copy the primary key (see WASInternal_copyPrimaryKey for explanation)
        return ((EJSHome) hi).WASInternal_copyPrimaryKey(beanId.getPrimaryKey());
    }
70042
@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	public PrefixedPropertiesEnumeration<?> propertyNames() {
		lock.readLock().lock();
		try {
			final Set result = new HashSet();
			for (final Object key : getKeyMap(false).keySet()) {
				result.add(getUnprefixedKey(key));
			}
			return new PrefixedPropertiesEnumerationImpl(result.iterator(), true);
		} finally {
			lock.readLock().unlock();
		}
	}
299406
public static List<SQLProperty> extractUsedProperties(Builder methodBuilder, SQLiteModelMethod method, Class<? extends Annotation> annotationClazz) {
		SQLiteEntity entity = method.getEntity();
		List<SQLProperty> listPropertyInContentValue = new ArrayList<SQLProperty>();

		Set<String> foundColumns = JQLChecker.getInstance().extractColumnsToInsertOrUpdate(method, method.jql.value, entity);

		// for each property in entity except primaryKey and excluded properties
		for (SQLProperty item : entity.getCollection()) {
			if (foundColumns.size() > 0 && !foundColumns.contains(item.getName())) {
				continue;
			}

			// add property to list of used properties
			listPropertyInContentValue.add(item);
		}

		return listPropertyInContentValue;

	}
897464
def get_enumeration(rq, v, endpoint, metadata={}, auth=None):
    
    # glogger.debug("Metadata before processing enums: {}".format(metadata))
    # We only fire the enum filling queries if indicated by the query metadata
    if 'enumerate' not in metadata:
        return None
    enumDict = _getDictWithKey(v, metadata['enumerate'])
    if enumDict:
        return enumDict[v]
    if v in metadata['enumerate']:
        return get_enumeration_sparql(rq, v, endpoint, auth)
    return None
610200
protected EnumerationValue[] getEnumConstants(final InputColumn<?> inputColumn,
            final ConfiguredPropertyDescriptor mappedEnumsProperty) {
        if (mappedEnumsProperty instanceof EnumerationProvider) {
            return ((EnumerationProvider) mappedEnumsProperty).values();
        } else {
            return EnumerationValue.fromArray(mappedEnumsProperty.getBaseType().getEnumConstants());
        }
    }
862712
@Override
    public <E> List<E> findAll(Class<E> entityClass, String[] columnsToSelect, Object... keys)
    {
        Object connection = getConnection();
        List results = new ArrayList();
        try
        {
            for (Object key : keys)
            {
                Object result = fetch(entityClass, key, connection, null);
                if (result != null)
                {
                    results.add(result);
                }
            }
        }
        catch (InstantiationException e)
        {
            logger.error("Error during find by key:", e);
            throw new PersistenceException(e);
        }
        catch (IllegalAccessException e)
        {
            logger.error("Error during find by key:", e);
            throw new PersistenceException(e);
        }
        return results;
    }
1332495
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(KEY);

        return(elements.elements());
    }
87151
public <TEnum extends Enum<TEnum>> TEnum getEnum(Enum<?> key, Class<TEnum> enumClass, TEnum defaultValue)
    {
        if (key == null)
        {
            return defaultValue;
        }

        return getEnum(key.name(), enumClass, defaultValue);
    }
1073467
protected Map<PropertyKey, Object> properties() {

        if (properties == null) {
            properties = new EnumMap<>(PropertyKey.class);
        }

        return properties;
    }
1306315
public ClassFileBuilder prepare() throws SupportException {

        // Add a property to the reference for each primary key in the master
        List<StorableProperty> masterPkProps = new ArrayList<StorableProperty>
            (mMasterStorableInfo.getPrimaryKeyProperties().values());

        // Sort master primary keys, to ensure consistent behavior.
        Collections.sort(masterPkProps,
                         BeanComparator.forClass(StorableProperty.class).orderBy("name"));

        for (StorableProperty masterPkProp : masterPkProps) {
            // Some of them may have already been added as explicit
            // primary keys, to articulate sort direction.
            if (!mBuilder.hasProperty(masterPkProp.getName())) {
                addProperty(masterPkProp);
                // For non-unique indexes, *all* master pk properties are members of the
                // generated primary key, in order to support duplicates.
                if (!mIsUnique) {
                    mPrimaryKey.addProperty(masterPkProp.getName());
                    mExtraPkProps.add(masterPkProp.getName());
                }
            }
        }

        // Ensure that a version property exists in the index entry, if the
        // user storable had one.
        if (!mBuilder.isVersioned()) {
            StorableProperty versionProperty = mMasterStorableInfo.getVersionProperty();
            if (versionProperty != null) {
                addProperty(versionProperty);
            }
        }

        ClassFileBuilder cfg = mBuilder.prepare();
        addSpecialMethods(cfg.getClassFile());
        return cfg;
    }
6238
public static JavaConstant ofEnumeration(EnumerationDescription enumerationDescription) {
            return new Dynamic(new ConstantDynamic(enumerationDescription.getValue(),
                    enumerationDescription.getEnumerationType().getDescriptor(),
                    new Handle(Opcodes.H_INVOKESTATIC,
                            CONSTANT_BOOTSTRAPS,
                            "enumConstant",
                            "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Enum;",
                            false)), enumerationDescription.getEnumerationType());
        }
518702
private static Map<String, Object> getEnumNamesMap(Class<? extends Enum<?>> enumType) {
		final String sourceMethod = "getEnumNameMap"; //$NON-NLS-1$
		final boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(sourceClass, sourceMethod, new Object[]{enumType});
		}
		Map<String, Object> result = new HashMap<String, Object>();
		Enum<?>[] values = enumType.getEnumConstants();
		for (Enum<?> value : values) {
			result.put(value.name(), value);
		}
		if (isTraceLogging) {
			log.exiting(sourceMethod, sourceMethod, result);
		}
		return result;
	}
148744
@Nonnull
  @SafeVarargs
  public static <ELEMENTTYPE> Enumeration <ELEMENTTYPE> getEnumeration (@Nullable final ELEMENTTYPE... aArray)
  {
    return getEnumeration (getIterator (aArray));
  }
1320710
public static ResourceKey key(Enum<?> enumValue, String key) {
        return new ResourceKey(enumValue.getClass().getName(), enumValue.name()).child(key);
    }