Coverage Summary for Class: Messages (net.sf.persism)
Class |
Class, %
|
Method, %
|
Line, %
|
Messages |
100%
(1/1)
|
100%
(4/4)
|
100%
(48/48)
|
1 package net.sf.persism;
2
3 enum Messages {
4 // todo that verify each occurs with code coverage (some additional tests required)
5
6 // Errors
7 PrimaryKeysDontExist("executeQuery: Primary keys don't exist in a Query. Please use params() rather than keys()"),
8 ObjectNotProperlyInitialized("Object %s was not properly initialized. Some properties not initialized in the queried columns (%s)"),
9 ObjectNotProperlyInitializedByQuery("Object %s was not properly initialized. Some properties not initialized by the queried columns: %s Missing: %s"),
10 IllegalArgumentReadingColumn("Illegal Argument occurred setting property: %s. Object %s. Column: %s Type of property: %s - Type read: %s VALUE: %s"),
11 NumberFormatException("NumberFormatException: Column: %s Type of property: %s - Type read: %s VALUE: %s"),
12 DateFormatException("%s. Column: %s Target Conversion: %s - Type read: %s VALUE: %s"),
13 ReadRecordColumnNotFound("readRecord: Could not find column in the SQL query for class: %s. Missing column: %s"),
14 ReadRecordCouldNotInstantiate("readRecord: Could instantiate the constructor for: %s params: %s (%s)"),
15 TableHasNoPrimaryKeys("Cannot perform %s - %s has no primary keys"),
16 TableHasNoPrimaryKeysForWhere("Could not determine WHERE clause for %s. No primary keys detected"),
17 ClassHasNoGetterForProperty("Class %s has no getter for property %s"),
18 NonAutoIncGeneratedNotSupported("Non-auto inc generated primary keys are not supported. Please assign your primary key value before performing an insert"),
19 CannotReadThisType("Cannot read a %s type object with this method"),
20 CouldNotFindTableNameInTheDatabase("Could not find a Table in the database named %s. Check the @Table annotation on %s"),
21 CouldNotFindViewNameInTheDatabase("Could not find a View in the database named %s. Check the @View annotation on %s"),
22 CouldNotDetermineTableOrViewForType("Could not determine a %s for type: %s Guesses were: %s"),
23 CouldNotDetermineTableOrViewForTypeMultipleMatches("Could not determine a %s for type: %s Guesses were: %s and we found multiple matching: %s"),
24 CouldNotFindConstructorForRecord("findConstructor: Could not find a constructor for class: %s properties: %s"),
25 OperationNotSupportedForView("%s: %s operation not supported for Views"),
26 OperationNotSupportedForJavaType("%s: %s operation not supported for Java types"),
27 OperationNotSupportedForNotTableQuery("%s: %s operation not supported for @NotTable classes"),
28 WhereNotSupportedForNotTableQueries("WHERE clause not supported for Queries (using @NotTable). If this is a View annotate the class as @View"),
29
30 // WARNINGS
31 UnknownConnectionType("Unknown connection type. Please contact Persism to add support for %s"),
32 NoPropertyFoundForColumn("No property found for column: %s class: %s"),
33 ColumnAnnotatedAsAutoIncButNAN("Column %s is annotated as auto-increment but it is not a number type (%s)"),
34 DatabaseMetaDataCouldNotFindPrimaryKeys("DatabaseMetaData could not find primary keys for table %s"),
35 DatabaseMetaDataCouldNotFindColumns("DatabaseMetaData could not find columns for table %s!"),
36 NoPrimaryKeyFoundForTable("No primary key found for table %s. Do not use with update/delete/fetch or add a primary key"),
37 NoConversionForUnknownType("Conversion: Unknown type: %s - no conversion performed."),
38 TinyIntMSSQL("COLUMN: %s: MSSQL Sees tinyint as 0 - 254 - Others -127 - +127 - no conversion performed - recommend changing it to SMALLINT/Short"),
39 PossibleOverflow("Possible overflow column %s - Target type is %s and Value type is %s"),
40 PropertyShouldBeAnObjectType("Property %s for column %s for class %s should be an Object type to properly detect NULL for defaults (change it from the primitive type to its Boxed version)."),
41 SettersFoundInReadOnlyObject("Setters found in read only object %s %s"),
42 UnknownSQLType("Unknown SQL TYPE: %s"),
43 ConverterValueTypeNotYetSupported("%s not yet supported"),
44 ConverterDoNotUseClobOrBlobAsAPropertyType("Usually you should not use blob or clob as a property type on a POJO. Blob maps to byteArray, Clob maps to String"),
45 ColumnTypeNotKnownForSQLType("Column type not known for SQL type %s. Reading as Object"),
46 InappropriateMethodUsedForSQLTypeInstance("%s It seems you're using the %s method with %s. You might prefer to use the %s method instead for better 'Find Usages'"),
47 UnknownTypeForPrimaryGeneratedKey("Unknown type for primary/generated key: %s. using getObject."),
48 UnknownTypeInSetParameters("setParameters: Unknown type: %s"),
49 UnSupportedTypeInSetParameters("setParameters: %s not supported yet. We're probably about to fail....."),
50 ParametersDoNotUseClobOrBlob("Usually you should not use blob or clob as an SQL parameter type. Blob maps to byteArray, Clob maps to String"),
51
52
53 ;
54
55 private final String message;
56
57 Messages(String message) {
58 this.message = message;
59 }
60
61 public String message(Object... params) {
62 if (params.length == 0) {
63 return message;
64 }
65 return String.format(message, params);
66 }
67 }