mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
Refs #1346 Better error reporting and JavaDocs
This commit is contained in:
parent
62faad76b0
commit
e68cb03a0c
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
|
||||
* Haulmont Technology proprietary and confidential.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
package com.haulmont.chile.core.datatypes;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
@ -7,7 +13,10 @@ import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Represents a data type of entity property
|
||||
* Represents a data type of entity property.
|
||||
*
|
||||
* @author abramov
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface Datatype<T> {
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
|
||||
* Haulmont Technology proprietary and confidential.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
package com.haulmont.chile.core.datatypes;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
@ -20,6 +26,9 @@ import javax.ejb.Local;
|
||||
* <p>
|
||||
* Automatically loads datatype definitions from the file <code>datatypes.xml</code> in the root of classpath. If no
|
||||
* such file found, configures datatypes from <code>/com/haulmont/chile/core/datatypes/datatypes.xml</code>
|
||||
*
|
||||
* @author abramov
|
||||
* @version $Id$
|
||||
*/
|
||||
public class Datatypes {
|
||||
|
||||
|
@ -55,6 +55,7 @@ public interface MetaClass extends MetadataObject<MetaClass> {
|
||||
* @param propertyPath dot-separated string
|
||||
* @return MetaPropertyPath instance, or null if the input parameter doesn't represent a valid path.
|
||||
*/
|
||||
@Nullable
|
||||
MetaPropertyPath getPropertyPath(String propertyPath);
|
||||
|
||||
/**
|
||||
|
@ -259,9 +259,9 @@ public class ViewRepository {
|
||||
}
|
||||
|
||||
final List<Element> propertyElements = propElem.elements("property");
|
||||
boolean extenedView = !propertyElements.isEmpty();
|
||||
boolean inlineView = !propertyElements.isEmpty();
|
||||
|
||||
if (refViewName != null && !extenedView) {
|
||||
if (refViewName != null && !inlineView) {
|
||||
|
||||
if (!range.isClass())
|
||||
throw new IllegalStateException(
|
||||
@ -289,7 +289,7 @@ public class ViewRepository {
|
||||
);
|
||||
}
|
||||
}
|
||||
if (range.isClass() && refView == null && extenedView) {
|
||||
if (range.isClass() && refView == null && inlineView) {
|
||||
// try to import anonymous views
|
||||
String ancestorViewName = propElem.attributeValue("view");
|
||||
if (ancestorViewName == null) {
|
||||
@ -308,7 +308,7 @@ public class ViewRepository {
|
||||
|
||||
private MetaClass getMetaClass(Element propElem, Range range) {
|
||||
MetaClass refMetaClass;
|
||||
String refEntityName = propElem.attributeValue("entity");
|
||||
String refEntityName = propElem.attributeValue("entity"); // this attribute is deprecated
|
||||
if (refEntityName == null) {
|
||||
refMetaClass = range.asClass();
|
||||
} else {
|
||||
|
@ -34,7 +34,6 @@
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name"/>
|
||||
<xs:attribute name="view"/>
|
||||
<xs:attribute name="entity"/>
|
||||
<xs:attribute name="lazy" type="xs:boolean"/>
|
||||
</xs:complexType>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user