public class View
extends java.lang.Object
implements java.io.Serializable
A view can be constructed in Java code or defined in XML and deployed
to the ViewRepository
for recurring usage.
Modifier and Type | Class and Description |
---|---|
static class |
View.ViewParams
Parameters object to be used in constructors.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASE
|
static java.lang.String |
LOCAL
Includes all local non-system properties.
|
static java.lang.String |
MINIMAL
Includes only properties contained in
NamePattern . |
Constructor and Description |
---|
View(java.lang.Class<? extends Entity> entityClass) |
View(java.lang.Class<? extends Entity> entityClass,
boolean includeSystemProperties) |
View(java.lang.Class<? extends Entity> entityClass,
java.lang.String name) |
View(java.lang.Class<? extends Entity> entityClass,
java.lang.String name,
boolean includeSystemProperties) |
View(View.ViewParams viewParams) |
View(View src,
java.lang.Class<? extends Entity> entityClass,
java.lang.String name,
boolean includeSystemProperties) |
View(View src,
java.lang.String name,
boolean includeSystemProperties) |
Modifier and Type | Method and Description |
---|---|
View |
addProperty(java.lang.String name)
Add a property to this view.
|
View |
addProperty(java.lang.String name,
View view)
Add a property to this view.
|
View |
addProperty(java.lang.String name,
View view,
boolean lazy)
Deprecated.
|
View |
addProperty(java.lang.String name,
View view,
FetchMode fetchMode)
Add a property to this view.
|
protected void |
addSystemPropertiesFrom(java.lang.Class<?> baseClass,
java.lang.Class<?> entityClass,
com.haulmont.chile.core.model.MetaClass metaClass,
Metadata metadata,
java.util.Set<java.lang.String> result) |
boolean |
containsProperty(java.lang.String name)
Check if a directly owned property with the given name exists in the view.
|
static View |
copy(View view) |
boolean |
equals(java.lang.Object o) |
protected java.util.Set<java.lang.String> |
findSystemProperties(java.lang.Class entityClass) |
java.lang.Class<? extends Entity> |
getEntityClass() |
protected java.util.List<java.lang.String> |
getInterfaceProperties(java.lang.Class<?> intf) |
java.lang.String |
getName() |
java.util.Collection<ViewProperty> |
getProperties() |
ViewProperty |
getProperty(java.lang.String name)
Get directly owned view property by name.
|
int |
hashCode() |
boolean |
hasLazyProperties()
Deprecated.
|
boolean |
loadPartialEntities()
If true, the view affects loading of local attributes.
|
protected void |
putProperties(java.util.Map<java.lang.String,ViewProperty> thisProperties,
java.util.Collection<ViewProperty> sourceProperties) |
View |
setLoadPartialEntities(boolean loadPartialEntities)
Specifies whether the view affects loading of local attributes.
|
java.lang.String |
toString() |
public static final java.lang.String LOCAL
public static final java.lang.String MINIMAL
NamePattern
.public static final java.lang.String BASE
NamePattern
(effectively MINIMAL
+ LOCAL
).public View(java.lang.Class<? extends Entity> entityClass)
public View(java.lang.Class<? extends Entity> entityClass, boolean includeSystemProperties)
public View(java.lang.Class<? extends Entity> entityClass, java.lang.String name)
public View(java.lang.Class<? extends Entity> entityClass, java.lang.String name, boolean includeSystemProperties)
public View(View src, java.lang.String name, boolean includeSystemProperties)
public View(View src, @Nullable java.lang.Class<? extends Entity> entityClass, java.lang.String name, boolean includeSystemProperties)
public View(View.ViewParams viewParams)
protected void putProperties(java.util.Map<java.lang.String,ViewProperty> thisProperties, java.util.Collection<ViewProperty> sourceProperties)
public java.lang.Class<? extends Entity> getEntityClass()
public java.lang.String getName()
public java.util.Collection<ViewProperty> getProperties()
public View addProperty(java.lang.String name, @Nullable View view, FetchMode fetchMode)
name
- property nameview
- a view for a reference attribute, or nullfetchMode
- fetch mode for a reference attribute@Deprecated public View addProperty(java.lang.String name, @Nullable View view, boolean lazy)
public View addProperty(java.lang.String name, View view)
name
- property nameview
- a view for a reference attribute, or nullpublic View addProperty(java.lang.String name)
name
- property namepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
@Nullable public ViewProperty getProperty(java.lang.String name)
name
- property namepublic boolean containsProperty(java.lang.String name)
name
- property namepublic boolean loadPartialEntities()
setLoadPartialEntities(boolean)
public View setLoadPartialEntities(boolean loadPartialEntities)
loadPartialEntities
- true to affect loading of local attributes@Deprecated public boolean hasLazyProperties()
protected java.util.Set<java.lang.String> findSystemProperties(java.lang.Class entityClass)
protected void addSystemPropertiesFrom(java.lang.Class<?> baseClass, java.lang.Class<?> entityClass, com.haulmont.chile.core.model.MetaClass metaClass, Metadata metadata, java.util.Set<java.lang.String> result)
protected java.util.List<java.lang.String> getInterfaceProperties(java.lang.Class<?> intf)