com.atlassian.jira.mock.ofbiz
Class MockGenericValue

java.lang.Object
  extended by java.util.Observable
      extended by org.ofbiz.core.entity.GenericEntity
          extended by org.ofbiz.core.entity.GenericValue
              extended by com.atlassian.jira.mock.ofbiz.MockGenericValue
All Implemented Interfaces:
Serializable, Cloneable, Comparable<org.ofbiz.core.entity.GenericEntity>, Map<String,Object>

public class MockGenericValue
extends org.ofbiz.core.entity.GenericValue

This was taken from atlassian-ofbiz and placed into its now rightful home of JIRA.

Since:
4.3
See Also:
Serialized Form

Nested Class Summary
 class MockGenericValue.MockModelEntity
           
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  boolean created
           
protected  boolean refreshed
           
protected  boolean removed
           
protected  boolean stored
           
 
Fields inherited from class org.ofbiz.core.entity.GenericValue
originalDbValues, relatedCache, relatedOneCache
 
Fields inherited from class org.ofbiz.core.entity.GenericEntity
delegatorName, entityName, fields, internalDelegator, modelEntity, modified
 
Constructor Summary
MockGenericValue(org.ofbiz.core.entity.GenericValue value)
           
MockGenericValue(String entityName)
           
MockGenericValue(String entityName, Long id)
           
MockGenericValue(String entityName, Map fields)
           
 
Method Summary
 Object clone()
           
 org.ofbiz.core.entity.GenericValue create()
           
 Object dangerousGetNoCheckButFast(org.ofbiz.core.entity.model.ModelField modelField)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(String name)
           
 Map<String,Object> getAllFields()
           
 Collection<String> getAllKeys()
           
 org.ofbiz.core.entity.GenericDelegator getDelegator()
           
 Map<String,Object> getFields(Collection collection)
           
 org.ofbiz.core.entity.model.ModelEntity getModelEntity()
           
 org.ofbiz.core.entity.GenericPK getPrimaryKey()
           
 List<org.ofbiz.core.entity.GenericValue> getRelated(String s)
           
 List<org.ofbiz.core.entity.GenericValue> getRelated(String s, Map map, List order)
           
 List<org.ofbiz.core.entity.GenericValue> getRelatedByAnd(String relationName, Map fields)
           
 List<org.ofbiz.core.entity.GenericValue> getRelatedOrderBy(String relationName, List orderBy)
           
 int hashCode()
           
 boolean isCreated()
           
 boolean isEmpty()
           
 boolean isRefreshed()
           
 boolean isRemoved()
           
 boolean isStored()
           
 Set keySet()
           
 boolean matchesFields(Map keyValuePairs)
           
 void refresh()
           
 void remove()
           
 void removeRelated(String relationName)
           
 void set(String name, Object value)
           
 void setDelegator(org.ofbiz.core.entity.GenericDelegator internalDelegator)
           
 void setRelated(String s, List relatedGVs)
           
 void setString(String s, String s1)
           
 int size()
           
 void store()
           
 String toString()
           
 Collection values()
           
 
Methods inherited from class org.ofbiz.core.entity.GenericValue
copyOriginalDbValues, getOriginalDbValue, getRelatedByAndCache, getRelatedByAndEmbeddedCache, getRelatedCache, getRelatedCache, getRelatedDummyPK, getRelatedDummyPK, getRelatedEmbeddedCache, getRelatedEmbeddedCache, getRelatedMulti, getRelatedMulti, getRelatedOne, getRelatedOneCache, getRelatedOneEmbeddedCache, getRelatedOrderByCache, getRelatedOrderByEmbeddedCache, originalDbValuesAvailable
 
Methods inherited from class org.ofbiz.core.entity.GenericEntity
addToXmlDocument, clear, compareTo, containsKey, containsPrimaryKey, containsValue, dangerousSetNoCheckButFast, get, getBoolean, getBytes, getDate, getDouble, getEntityName, getFloat, getInteger, getLong, getString, getTime, getTimestamp, isModified, isPrimaryKey, lockEnabled, makeXmlDocument, makeXmlElement, makeXmlElement, put, putAll, remove, set, setBytes, setFields, setNonPKFields, setNonPKFields, setPKFields, setPKFields, writeXmlText
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

created

protected boolean created

stored

protected boolean stored

refreshed

protected boolean refreshed

removed

protected boolean removed
Constructor Detail

MockGenericValue

public MockGenericValue(org.ofbiz.core.entity.GenericValue value)

MockGenericValue

public MockGenericValue(String entityName)

MockGenericValue

public MockGenericValue(String entityName,
                        Map fields)

MockGenericValue

public MockGenericValue(String entityName,
                        Long id)
Method Detail

get

public Object get(String name)
Overrides:
get in class org.ofbiz.core.entity.GenericEntity

set

public void set(String name,
                Object value)
Overrides:
set in class org.ofbiz.core.entity.GenericEntity

getAllKeys

public Collection<String> getAllKeys()
Overrides:
getAllKeys in class org.ofbiz.core.entity.GenericEntity

getFields

public Map<String,Object> getFields(Collection collection)
Overrides:
getFields in class org.ofbiz.core.entity.GenericEntity

getAllFields

public Map<String,Object> getAllFields()
Overrides:
getAllFields in class org.ofbiz.core.entity.GenericEntity

getRelated

public List<org.ofbiz.core.entity.GenericValue> getRelated(String s)
                                                    throws org.ofbiz.core.entity.GenericEntityException
Overrides:
getRelated in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

getRelated

public List<org.ofbiz.core.entity.GenericValue> getRelated(String s,
                                                           Map map,
                                                           List order)
                                                    throws org.ofbiz.core.entity.GenericEntityException
Overrides:
getRelated in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

setRelated

public void setRelated(String s,
                       List relatedGVs)

create

public org.ofbiz.core.entity.GenericValue create()
                                          throws org.ofbiz.core.entity.GenericEntityException
Overrides:
create in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

isCreated

public boolean isCreated()

isStored

public boolean isStored()

isRemoved

public boolean isRemoved()

isRefreshed

public boolean isRefreshed()

getModelEntity

public org.ofbiz.core.entity.model.ModelEntity getModelEntity()
Overrides:
getModelEntity in class org.ofbiz.core.entity.GenericEntity

matchesFields

public boolean matchesFields(Map keyValuePairs)
Overrides:
matchesFields in class org.ofbiz.core.entity.GenericEntity

getPrimaryKey

public org.ofbiz.core.entity.GenericPK getPrimaryKey()
Overrides:
getPrimaryKey in class org.ofbiz.core.entity.GenericEntity

setDelegator

public void setDelegator(org.ofbiz.core.entity.GenericDelegator internalDelegator)
Overrides:
setDelegator in class org.ofbiz.core.entity.GenericEntity

getDelegator

public org.ofbiz.core.entity.GenericDelegator getDelegator()
Overrides:
getDelegator in class org.ofbiz.core.entity.GenericEntity

store

public void store()
           throws org.ofbiz.core.entity.GenericEntityException
Overrides:
store in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

remove

public void remove()
            throws org.ofbiz.core.entity.GenericEntityException
Overrides:
remove in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

removeRelated

public void removeRelated(String relationName)
                   throws org.ofbiz.core.entity.GenericEntityException
Overrides:
removeRelated in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

refresh

public void refresh()
             throws org.ofbiz.core.entity.GenericEntityException
Overrides:
refresh in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

toString

public String toString()
Overrides:
toString in class org.ofbiz.core.entity.GenericEntity

dangerousGetNoCheckButFast

public Object dangerousGetNoCheckButFast(org.ofbiz.core.entity.model.ModelField modelField)
Overrides:
dangerousGetNoCheckButFast in class org.ofbiz.core.entity.GenericEntity

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class org.ofbiz.core.entity.GenericEntity

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class org.ofbiz.core.entity.GenericEntity

setString

public void setString(String s,
                      String s1)
Overrides:
setString in class org.ofbiz.core.entity.GenericEntity

getRelatedOrderBy

public List<org.ofbiz.core.entity.GenericValue> getRelatedOrderBy(String relationName,
                                                                  List orderBy)
                                                           throws org.ofbiz.core.entity.GenericEntityException
Overrides:
getRelatedOrderBy in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

getRelatedByAnd

public List<org.ofbiz.core.entity.GenericValue> getRelatedByAnd(String relationName,
                                                                Map fields)
                                                         throws org.ofbiz.core.entity.GenericEntityException
Overrides:
getRelatedByAnd in class org.ofbiz.core.entity.GenericValue
Throws:
org.ofbiz.core.entity.GenericEntityException

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map<String,Object>
Overrides:
entrySet in class org.ofbiz.core.entity.GenericEntity

keySet

public Set keySet()
Specified by:
keySet in interface Map<String,Object>
Overrides:
keySet in class org.ofbiz.core.entity.GenericEntity

size

public int size()
Specified by:
size in interface Map<String,Object>
Overrides:
size in class org.ofbiz.core.entity.GenericEntity

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,Object>
Overrides:
isEmpty in class org.ofbiz.core.entity.GenericEntity

values

public Collection values()
Specified by:
values in interface Map<String,Object>
Overrides:
values in class org.ofbiz.core.entity.GenericEntity

clone

public Object clone()
Overrides:
clone in class org.ofbiz.core.entity.GenericValue


Copyright © 2002-2013 Atlassian. All Rights Reserved.