Package me.ahoo.cosid.accessor
Class CosIdAccessor.NotFound
java.lang.Object
me.ahoo.cosid.accessor.CosIdAccessor.NotFound
- All Implemented Interfaces:
CosIdAccessor,CosIdGetter,CosIdSetter,EnsureId,IdMetadata
- Enclosing interface:
- CosIdAccessor
Sentinel implementation representing a "not found" accessor.
This implementation provides null/default behavior for all accessor methods, allowing the framework to handle cases where no valid ID field is found without explicit null checks throughout the code.
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.ahoo.cosid.accessor.CosIdAccessor
CosIdAccessor.NotFound -
Field Summary
Fields inherited from interface me.ahoo.cosid.accessor.CosIdAccessor
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEnsure the target object has an ID (always returns false for NotFound).Get the ID value from the target object (always returns null for NotFound).Get the ID definition (always returns null for NotFound).Get the ID field (always returns null for NotFound).Get the ID generator (always returns null for NotFound).voidSet the ID value on the target object (no-op for NotFound).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.ahoo.cosid.accessor.IdMetadata
getGeneratorName, getIdDeclaringClass, getIdType
-
Constructor Details
-
NotFound
public NotFound()
-
-
Method Details
-
getIdDefinition
Get the ID definition (always returns null for NotFound).- Specified by:
getIdDefinitionin interfaceIdMetadata- Returns:
- null
-
getIdGenerator
Get the ID generator (always returns null for NotFound).- Specified by:
getIdGeneratorin interfaceIdMetadata- Returns:
- null
-
getIdField
Get the ID field (always returns null for NotFound).- Specified by:
getIdFieldin interfaceIdMetadata- Returns:
- null
-
getId
Get the ID value from the target object (always returns null for NotFound).- Specified by:
getIdin interfaceCosIdGetter- Parameters:
target- The target object- Returns:
- null
-
setId
Set the ID value on the target object (no-op for NotFound).- Specified by:
setIdin interfaceCosIdSetter- Parameters:
target- The target objectid- The ID value to set
-
ensureId
Ensure the target object has an ID (always returns false for NotFound).
-