changeset 58:153a0232270b

cleanup and better comments.
author casties
date Fri, 09 Dec 2016 21:19:21 +0100
parents e08f3dd127a5
children 6e08ff123ae6
files src/main/java/org/mpi/openmind/cache/WrapperService.java src/main/java/org/mpi/openmind/repository/services/AbstractPersistenceService.java
diffstat 2 files changed, 13 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/mpi/openmind/cache/WrapperService.java	Thu Dec 08 15:39:26 2016 +0100
+++ b/src/main/java/org/mpi/openmind/cache/WrapperService.java	Fri Dec 09 21:19:21 2016 +0100
@@ -421,13 +421,13 @@
 	}
 
 	/**
-	 * Returns a list of attributes by objectClass of the entity, the att Name
-	 * and its value.
+	 * Returns a sorted list of attributes by def (=objectClass) of the entity, the att Name
+	 * and its (normalized) value.
 	 * 
 	 * @param def
 	 * @param attName
 	 * @param attValue
-	 *            sub string and ignores case sensitive.
+	 *            case insensitive sub string match.
 	 * @param maxResults
 	 * @return
 	 */
@@ -470,6 +470,16 @@
 		return list;
 	}
 	
+	/**
+     * Returns a list of attributes by def (=objectClass) of the entity, the att Name
+     * and its (normalized) value.
+     * 
+	 * @param def
+	 * @param attName
+	 * @param attValue
+	 * @param maxResults
+	 * @return
+	 */
 	private List<Attribute> getAttributesByDefByAttName0(String def,
 			String attName, String attValue, int maxResults) {
 		List<Attribute> list = new ArrayList<Attribute>();
--- a/src/main/java/org/mpi/openmind/repository/services/AbstractPersistenceService.java	Thu Dec 08 15:39:26 2016 +0100
+++ b/src/main/java/org/mpi/openmind/repository/services/AbstractPersistenceService.java	Fri Dec 09 21:19:21 2016 +0100
@@ -39,12 +39,6 @@
 
 	private boolean importMode = false;
 
-	/*
-	 * static { logger.setLevel(Level.DEBUG); PatternLayout layout = new
-	 * PatternLayout( "%d{ABSOLUTE} %5p %c{1}:%L - %m%n"); Appender stdout = new
-	 * ConsoleAppender(layout, "System.out"); logger.addAppender(stdout); }
-	 */
-
 	public AbstractPersistenceService() {
 	}
 
@@ -65,19 +59,6 @@
 		return ownValue;
 	}
 
-	/*
-	 * Performs the actual disabling of the Hibernate second-level cache.
-	 */
-	/*
-	protected void disableSecondLevelCache() {
-		Map<Object, Cache> cacheRegionsMap = ((SessionFactoryImpl) HibernateUtil
-				.getSessionFactory()).getAllSecondLevelCacheRegions();
-		Collection<Cache> cacheRegions = cacheRegionsMap.values();
-		for (Cache cache : cacheRegions) {
-			cache.clear();
-		}
-	}*/
-
 	public int dropAssertions() {
 		int row = 0;
 		try {