com.quinsoft.zeidon.standardoe.AttributeHashKeyMap Maven / Gradle / Ivy
The newest version!
/**
This file is part of the Zeidon Java Object Engine (Zeidon JOE).
Zeidon JOE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Zeidon JOE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Zeidon JOE. If not, see .
Copyright 2009-2015 QuinSoft
*/
package com.quinsoft.zeidon.standardoe;
import java.util.HashMap;
import java.util.Map;
import com.quinsoft.zeidon.ZeidonException;
import com.quinsoft.zeidon.domains.Domain;
import com.quinsoft.zeidon.objectdefinition.AttributeDef;
import com.quinsoft.zeidon.objectdefinition.AttributeHashKeyType;
import com.quinsoft.zeidon.objectdefinition.EntityDef;
/**
* This class keeps track of attribute hash keys. AHKs are attributes that have values
* that are unique in an OI or unique among siblings under a parent. The uniqueness allows
* us to keep a hashmap of the attributes values pointing to the entity instance. This can
* make cursor processing much faster if we're setting the cursor by the attribute value.
*
*/
class AttributeHashKeyMap
{
private final ObjectInstance objectInstance;
/**
* A map is kept for each attribute that can be a hash key.
*/
private Map> hashKeyAttributeMap;
/**
* This constructor is used in many places and should be as low-impact as possible.
*
* @param oi
*/
AttributeHashKeyMap( ObjectInstance oi )
{
objectInstance = oi;
}
private TaskImpl getTask()
{
return objectInstance.getTask();
}
private Map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy