
com.company.sakila.db0.sakila.address.generated.GeneratedAddress Maven / Gradle / Ivy
package com.company.sakila.db0.sakila.address.generated;
import com.company.sakila.db0.sakila.address.Address;
import com.company.sakila.db0.sakila.city.City;
import com.speedment.common.annotation.GeneratedCode;
import com.speedment.runtime.config.identifier.ColumnIdentifier;
import com.speedment.runtime.config.identifier.TableIdentifier;
import com.speedment.runtime.core.manager.Manager;
import com.speedment.runtime.core.util.OptionalUtil;
import com.speedment.runtime.field.ComparableField;
import com.speedment.runtime.field.IntField;
import com.speedment.runtime.field.IntForeignKeyField;
import com.speedment.runtime.field.ReferenceField;
import com.speedment.runtime.field.StringField;
import com.speedment.runtime.typemapper.TypeMapper;
import java.sql.Blob;
import java.sql.Timestamp;
import java.util.Optional;
/**
* The generated base for the {@link
* com.company.sakila.db0.sakila.address.Address}-interface representing
* entities of the {@code address}-table in the database.
*
* This file has been automatically generated by Speedment. Any changes made to
* it will be overwritten.
*
* @author Speedment
*/
@GeneratedCode("Speedment")
public interface GeneratedAddress {
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getAddressId()} method.
*/
IntField
ADDRESS_ID = IntField.create(
Identifier.ADDRESS_ID,
Address::getAddressId,
Address::setAddressId,
TypeMapper.primitive(),
true
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getAddress()} method.
*/
StringField ADDRESS = StringField.create(
Identifier.ADDRESS,
Address::getAddress,
Address::setAddress,
TypeMapper.identity(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getAddress2()} method.
*/
StringField ADDRESS2 = StringField.create(
Identifier.ADDRESS2,
o -> OptionalUtil.unwrap(o.getAddress2()),
Address::setAddress2,
TypeMapper.identity(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getDistrict()} method.
*/
StringField DISTRICT = StringField.create(
Identifier.DISTRICT,
Address::getDistrict,
Address::setDistrict,
TypeMapper.identity(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getCityId()} method.
*/
IntForeignKeyField CITY_ID = IntForeignKeyField.create(
Identifier.CITY_ID,
Address::getCityId,
Address::setCityId,
City.CITY_ID,
TypeMapper.primitive(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getPostalCode()} method.
*/
StringField POSTAL_CODE = StringField.create(
Identifier.POSTAL_CODE,
o -> OptionalUtil.unwrap(o.getPostalCode()),
Address::setPostalCode,
TypeMapper.identity(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getPhone()} method.
*/
StringField PHONE = StringField.create(
Identifier.PHONE,
Address::getPhone,
Address::setPhone,
TypeMapper.identity(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getLocation()} method.
*/
ReferenceField LOCATION = ReferenceField.create(
Identifier.LOCATION,
Address::getLocation,
Address::setLocation,
TypeMapper.identity(),
false
);
/**
* This Field corresponds to the {@link Address} field that can be obtained
* using the {@link Address#getLastUpdate()} method.
*/
ComparableField LAST_UPDATE = ComparableField.create(
Identifier.LAST_UPDATE,
Address::getLastUpdate,
Address::setLastUpdate,
TypeMapper.identity(),
false
);
/**
* Returns the addressId of this Address. The addressId field corresponds to
* the database column db0.sakila.address.address_id.
*
* @return the addressId of this Address
*/
int getAddressId();
/**
* Returns the address of this Address. The address field corresponds to the
* database column db0.sakila.address.address.
*
* @return the address of this Address
*/
String getAddress();
/**
* Returns the address2 of this Address. The address2 field corresponds to
* the database column db0.sakila.address.address2.
*
* @return the address2 of this Address
*/
Optional getAddress2();
/**
* Returns the district of this Address. The district field corresponds to
* the database column db0.sakila.address.district.
*
* @return the district of this Address
*/
String getDistrict();
/**
* Returns the cityId of this Address. The cityId field corresponds to the
* database column db0.sakila.address.city_id.
*
* @return the cityId of this Address
*/
int getCityId();
/**
* Returns the postalCode of this Address. The postalCode field corresponds
* to the database column db0.sakila.address.postal_code.
*
* @return the postalCode of this Address
*/
Optional getPostalCode();
/**
* Returns the phone of this Address. The phone field corresponds to the
* database column db0.sakila.address.phone.
*
* @return the phone of this Address
*/
String getPhone();
/**
* Returns the location of this Address. The location field corresponds to
* the database column db0.sakila.address.location.
*
* @return the location of this Address
*/
Blob getLocation();
/**
* Returns the lastUpdate of this Address. The lastUpdate field corresponds
* to the database column db0.sakila.address.last_update.
*
* @return the lastUpdate of this Address
*/
Timestamp getLastUpdate();
/**
* Sets the addressId of this Address. The addressId field corresponds to
* the database column db0.sakila.address.address_id.
*
* @param addressId to set of this Address
* @return this Address instance
*/
Address setAddressId(int addressId);
/**
* Sets the address of this Address. The address field corresponds to the
* database column db0.sakila.address.address.
*
* @param address to set of this Address
* @return this Address instance
*/
Address setAddress(String address);
/**
* Sets the address2 of this Address. The address2 field corresponds to the
* database column db0.sakila.address.address2.
*
* @param address2 to set of this Address
* @return this Address instance
*/
Address setAddress2(String address2);
/**
* Sets the district of this Address. The district field corresponds to the
* database column db0.sakila.address.district.
*
* @param district to set of this Address
* @return this Address instance
*/
Address setDistrict(String district);
/**
* Sets the cityId of this Address. The cityId field corresponds to the
* database column db0.sakila.address.city_id.
*
* @param cityId to set of this Address
* @return this Address instance
*/
Address setCityId(int cityId);
/**
* Sets the postalCode of this Address. The postalCode field corresponds to
* the database column db0.sakila.address.postal_code.
*
* @param postalCode to set of this Address
* @return this Address instance
*/
Address setPostalCode(String postalCode);
/**
* Sets the phone of this Address. The phone field corresponds to the
* database column db0.sakila.address.phone.
*
* @param phone to set of this Address
* @return this Address instance
*/
Address setPhone(String phone);
/**
* Sets the location of this Address. The location field corresponds to the
* database column db0.sakila.address.location.
*
* @param location to set of this Address
* @return this Address instance
*/
Address setLocation(Blob location);
/**
* Sets the lastUpdate of this Address. The lastUpdate field corresponds to
* the database column db0.sakila.address.last_update.
*
* @param lastUpdate to set of this Address
* @return this Address instance
*/
Address setLastUpdate(Timestamp lastUpdate);
/**
* Queries the specified manager for the referenced City. If no such City
* exists, an {@code NullPointerException} will be thrown.
*
* @param foreignManager the manager to query for the entity
* @return the foreign entity referenced
*/
City findCityId(Manager foreignManager);
enum Identifier implements ColumnIdentifier {
ADDRESS_ID ("address_id"),
ADDRESS ("address"),
ADDRESS2 ("address2"),
DISTRICT ("district"),
CITY_ID ("city_id"),
POSTAL_CODE ("postal_code"),
PHONE ("phone"),
LOCATION ("location"),
LAST_UPDATE ("last_update");
private final String columnId;
private final TableIdentifier tableIdentifier;
Identifier(String columnId) {
this.columnId = columnId;
this.tableIdentifier = TableIdentifier.of( getDbmsId(),
getSchemaId(),
getTableId());
}
@Override
public String getDbmsId() {
return "db0";
}
@Override
public String getSchemaId() {
return "sakila";
}
@Override
public String getTableId() {
return "address";
}
@Override
public String getColumnId() {
return this.columnId;
}
@Override
public TableIdentifier asTableIdentifier() {
return this.tableIdentifier;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy