<%-- * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --%> <%-- JSTL tags --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ page import="java.util.*" %>
Arbitrary Converter: The column converted is a VARCAHAR. ResultSetShape is used to specify that the property will be a SDODataTypes.DATE. So this example uses a converter that transforms a string column into a date property and conversely, a date property back to a string for the underlying column.
The converter returns 1957.09.27 if the column value is "Pavick" and 1966.12.20 if the value is "Williams"
On write, the converter returns "Williams" if the property value is 1966.12.20 and "Pavick" if the property value is 1957.09.27
Check using direct database connection that the database table rows's column values are either "Williams" or "Pavick".

Select * from CUSTOMER where ID = 1;
Check First Customer's LastName is 1957.09.27
Set First Customer's LastName to 1966.12.20
Check First Customer's LastName is 1966.12.20