private String redisKey(ModelExt<?> m) {
		Table table = m.table();
		StringBuilder key = new StringBuilder();
		key.append(RECORDS);
		key.append(table.getName());
		key.append(":");
		//fetch primary keys' values
		String[] primaryKeys = table.getPrimaryKey();
		//format key
		for (int idx = 0; idx < primaryKeys.length; idx++) {
			Object primaryKeyVal = m.get(primaryKeys[idx]);
			if (null != primaryKeyVal) {
				if (idx > 0) {
					key.append("|");
				}
				key.append(primaryKeyVal);
			}
		}
		return key.toString();
	}
private String redisKey ( ModelExt < ? > m ) { Table table = m . table ( ) ; StringBuilder key = new StringBuilder ( ) ; key . append ( RECORDS ) ; key . append ( table . getName ( ) ) ; key . append ( ":" ) ; String [ ] primaryKeys = table . getPrimaryKey ( ) ; for ( int idx = 0 ; idx < primaryKeys . length ; idx ++ ) { Object primaryKeyVal = m . get ( primaryKeys [ idx ] ) ; if ( null != primaryKeyVal ) { if ( idx > 0 ) { key . append ( "|" ) ; } key . append ( primaryKeyVal ) ; } } return key . toString ( ) ; }
redis key: records:tablename: id1 | id2 | id3...
eg: the user has three primarykeys id1=1,id2=2,id3=3, so the redisKey is 'records:user:1|2|3'.
@return redis key