![JAR search and dependency download from the Maven repository](/logo.png)
org.ujoframework.extensions.UjoMiddle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ujo-orm Show documentation
Show all versions of ujo-orm Show documentation
Quick ORM implementation based on the UJO objects.
/*
* Copyright 2007 Paul Ponec
*
* 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.
*/
package org.ujoframework.extensions;
import org.ujoframework.Ujo;
import org.ujoframework.UjoProperty;
/**
* This is an middle extended Ujo interface designed for a more conventional property access evaluated by developers.
*
*
Sample of usage:
*public class Person extends MapUjoExt {
*
* public static final UjoProperty<Person, String > NAME = newProperty("Name", String.class);
* public static final UjoProperty<Person, Double > CASH = newProperty("Cash", Double.class);
* public static final UjoProperty<Person, Person> CHILD = newProperty("Child", Person.class);
*
* public void init() {
* set(NAME, "George");
* String name = get(NAME);
* double cash = get(CHILD, CASH);
* }
*}
* @author Paul Ponec
* @since UJO release 0.85
*/
public interface UjoMiddle extends Ujo {
/** Getter based on one UjoProperty */
public VALUE get
( UjoProperty property);
/** Setter based on UjoProperty. Type of value is checked in the runtime. */
public Ujo set
( UjoProperty property
, VALUE value);
/**
* Returns a String value by a NULL context.
* otherwise method returns an instance of String.
*
The method can be an alias for a method readValueString(...)
*
* @param property A Property
* @return If property type is "container" then result is null.
*/
public String getText(final UjoProperty property);
/**
* Set value from a String format by a NULL context. Property can't be an "container" type (Ujo, List, Object[]).
*
The method can be an alias for a method writeValueString(...)
* @param property Property
* @param value String value
*/
public void setText(final UjoProperty property, final String value);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy