<commit_before>package org.jasig.portal.groups;

import java.sql.*;
import java.util.*;
import org.jasig.portal.*;
import org.jasig.portal.services.LogService;

/**
 * This class provides access to the entity types used by <code>IEntityGroups</code>.  
 * Type, to a group, is like <code>Class</code> to an <code>Array</code>.  It specifies 
 * what kind of entities the <code>IEntityGroup</code> contains.
 * <p>
 * Each type is associated with an <code>Integer</code> which is used to store the type in
 * the portal data store.  This class translates between the <code>Integer</code> and 
 * <code>Class</code> values.  
 *
 * @author <NAME>
 * @version 1.0, 12/5/01  
 */
public class EntityTypes {

	private static EntityTypes singleton;

	// Caches for entityType classes.
	private Map entityTypesByID;
	private Map entityIDsByType;
	
	// Constant strings for ENTITY TYPE table:
	private static String ENTITY_TYPE_TABLE = "UP_GROUP_ENTITY_TYPE";
	private static String TYPE_ID_COLUMN = "ENTITY_TYPE_ID";
	private static String TYPE_NAME_COLUMN = "ENTITY_TYPE_NAME";

	// SQL strings for ENTITY TYPE crud:
	private static String selectEntityTypesSql; 
	
/**
 * EntityTypes constructor comment.
 */
public EntityTypes()
{
	super();
	initialize();
}
/**
 * Interface to the entity types cache.
 * @return java.lang.Integer
 */
public Integer getEntityIDFromType(Class type) 
{
	return (Integer)getEntityIDsByType().get(type);
}
/**
 * @return java.util.Map
 */
private java.util.Map getEntityIDsByType() 
{
	if ( entityIDsByType == null )
		entityIDsByType = new HashMap(5);	
	return entityIDsByType;
}
/**
 * Interface to the entity types cache.
 * @return java.lang.Class
 */<commit_msg>Add static var. for null entity type id<commit_after>package org.jasig.portal.groups;

import java.sql.*;
import java.util.*;
import org.jasig.portal.*;
import org.jasig.portal.services.LogService;

/**
 * This class provides access to the entity types used by <code>IEntityGroups</code>.  
 * Type, to a group, is like <code>Class</code> to an <code>Array</code>.  It specifies 
 * what kind of entities the <code>IEntityGroup</code> contains.
 * <p>
 * Each type is associated with an <code>Integer</code> which is used to store the type in
 * the portal data store.  This class translates between the <code>Integer</code> and 
 * <code>Class</code> values.  
 *
 * @author <NAME>
 * @version 1.0, 12/5/01  
 */
public class EntityTypes {

	private static EntityTypes singleton;

	// Caches for entityType classes.
	private Map entityTypesByID;
	private Map entityIDsByType;
	
	// Constant strings for ENTITY TYPE table:
	private static String ENTITY_TYPE_TABLE = "UP_GROUP_ENTITY_TYPE";
	private static String TYPE_ID_COLUMN = "ENTITY_TYPE_ID";
	private static String TYPE_NAME_COLUMN = "ENTITY_TYPE_NAME";

	// SQL strings for ENTITY TYPE crud:
	private static String selectEntityTypesSql;

	// For retrieving all types:
	public static int NULL_TYPE_ID = -1;
/**
 * EntityTypes constructor comment.
 */
public EntityTypes()
{
	super();
	initialize();
}
/**
 * Interface to the entity types cache.
 * @return java.lang.Integer
 */
public Integer getEntityIDFromType(Class type) 
{
	return (Integer)getEntityIDsByType().get(type);
}
/**
 * @return java.util.Map
 */
private java.util.Map getEntityIDsByType() 
{
	if ( entityIDsByType == null )
		entityIDsByType = new HashMap(5);	
	return entityIDsByType;
}
/**
 * Interface to the entity types cache.
 * @return java.lang.Class
 */
{'fraction_non_alphanumeric': 0.11306098964326812, 'fraction_numerical': 0.004890678941311853, 'mean_word_length': 4.166419019316494, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4324941', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1081, 'n_words': 344}