use of org.apache.cayenne.configuration.event.DataMapEvent in project cayenne by apache.
the class DataMapView method setDefaultClientSuperclass.
void setDefaultClientSuperclass(String newSuperclass) {
DataMap dataMap = eventController.getCurrentDataMap();
if (dataMap == null) {
return;
}
if (newSuperclass != null && newSuperclass.trim().length() == 0) {
newSuperclass = null;
}
String oldSuperclass = dataMap.getDefaultClientSuperclass();
if (Util.nullSafeEquals(newSuperclass, oldSuperclass)) {
return;
}
dataMap.setDefaultClientSuperclass(newSuperclass);
eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
}
use of org.apache.cayenne.configuration.event.DataMapEvent in project cayenne by apache.
the class DataMapView method setQuoteSQLIdentifiers.
void setQuoteSQLIdentifiers(boolean flag) {
DataMap dataMap = eventController.getCurrentDataMap();
if (dataMap == null) {
return;
}
if (dataMap.isQuotingSQLIdentifiers() != flag) {
dataMap.setQuotingSQLIdentifiers(flag);
eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
}
}
use of org.apache.cayenne.configuration.event.DataMapEvent in project cayenne by apache.
the class DataMapView method setDefaultPackage.
void setDefaultPackage(String newDefaultPackage) {
DataMap dataMap = eventController.getCurrentDataMap();
if (dataMap == null) {
return;
}
if (newDefaultPackage != null && newDefaultPackage.trim().length() == 0) {
newDefaultPackage = null;
}
String oldPackage = dataMap.getDefaultPackage();
if (Util.nullSafeEquals(newDefaultPackage, oldPackage)) {
return;
}
dataMap.setDefaultPackage(newDefaultPackage);
// update class generation preferences
eventController.getDataMapPreferences("").setSuperclassPackage(newDefaultPackage, DataMapDefaults.DEFAULT_SUPERCLASS_PACKAGE_SUFFIX);
eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
}
use of org.apache.cayenne.configuration.event.DataMapEvent in project cayenne by apache.
the class DataMapView method setDefaultSuperclass.
void setDefaultSuperclass(String newSuperclass) {
DataMap dataMap = eventController.getCurrentDataMap();
if (dataMap == null) {
return;
}
if (newSuperclass != null && newSuperclass.trim().length() == 0) {
newSuperclass = null;
}
String oldSuperclass = dataMap.getDefaultSuperclass();
if (Util.nullSafeEquals(newSuperclass, oldSuperclass)) {
return;
}
dataMap.setDefaultSuperclass(newSuperclass);
eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
}
use of org.apache.cayenne.configuration.event.DataMapEvent in project cayenne by apache.
the class DataMapView method setDefaultCatalog.
void setDefaultCatalog(String newCatalog) {
DataMap dataMap = eventController.getCurrentDataMap();
if (dataMap == null) {
return;
}
if (newCatalog != null && newCatalog.trim().length() == 0) {
newCatalog = null;
}
String oldCatalog = dataMap.getDefaultCatalog();
if (Util.nullSafeEquals(newCatalog, oldCatalog)) {
return;
}
dataMap.setDefaultCatalog(newCatalog);
eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
}
Aggregations