package com.company.sakila.db0.sakila.inventory.generated; import com.company.sakila.db0.sakila.film.Film; import com.company.sakila.db0.sakila.inventory.Inventory; import com.company.sakila.db0.sakila.store.Store; 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.field.ComparableField; import com.speedment.runtime.field.IntField; import com.speedment.runtime.field.IntForeignKeyField; import com.speedment.runtime.field.ShortForeignKeyField; import com.speedment.runtime.typemapper.TypeMapper; import java.sql.Timestamp; /** * The generated base for the {@link * com.company.sakila.db0.sakila.inventory.Inventory}-interface representing * entities of the {@code inventory}-table in the database. * <p> * This file has been automatically generated by Speedment. Any changes made to * it will be overwritten. * * @author Speedment */ @GeneratedCode("Speedment") public interface GeneratedInventory { /** * This Field corresponds to the {@link Inventory} field that can be * obtained using the {@link Inventory#getInventoryId()} method. */ final IntField<Inventory, Integer> INVENTORY_ID = IntField.create( Identifier.INVENTORY_ID, Inventory::getInventoryId, Inventory::setInventoryId, TypeMapper.primitive(), true ); /** * This Field corresponds to the {@link Inventory} field that can be * obtained using the {@link Inventory#getFilmId()} method. */ final IntForeignKeyField<Inventory, Integer, Film> FILM_ID = IntForeignKeyField.create( Identifier.FILM_ID, Inventory::getFilmId, Inventory::setFilmId, Film.FILM_ID, TypeMapper.primitive(), false ); /** * This Field corresponds to the {@link Inventory} field that can be * obtained using the {@link Inventory#getStoreId()} method. */ final ShortForeignKeyField<Inventory, Short, Store> STORE_ID = ShortForeignKeyField.create( Identifier.STORE_ID, Inventory::getStoreId, Inventory::setStoreId, Store.STORE_ID, TypeMapper.primitive(), false ); /** * This Field corresponds to the {@link Inventory} field that can be * obtained using the {@link Inventory#getLastUpdate()} method. */ final ComparableField<Inventory, Timestamp, Timestamp> LAST_UPDATE = ComparableField.create( Identifier.LAST_UPDATE, Inventory::getLastUpdate, Inventory::setLastUpdate, TypeMapper.identity(), false ); /** * Returns the inventoryId of this Inventory. The inventoryId field * corresponds to the database column db0.sakila.inventory.inventory_id. * * @return the inventoryId of this Inventory */ int getInventoryId(); /** * Returns the filmId of this Inventory. The filmId field corresponds to the * database column db0.sakila.inventory.film_id. * * @return the filmId of this Inventory */ int getFilmId(); /** * Returns the storeId of this Inventory. The storeId field corresponds to * the database column db0.sakila.inventory.store_id. * * @return the storeId of this Inventory */ short getStoreId(); /** * Returns the lastUpdate of this Inventory. The lastUpdate field * corresponds to the database column db0.sakila.inventory.last_update. * * @return the lastUpdate of this Inventory */ Timestamp getLastUpdate(); /** * Sets the inventoryId of this Inventory. The inventoryId field corresponds * to the database column db0.sakila.inventory.inventory_id. * * @param inventoryId to set of this Inventory * @return this Inventory instance */ Inventory setInventoryId(int inventoryId); /** * Sets the filmId of this Inventory. The filmId field corresponds to the * database column db0.sakila.inventory.film_id. * * @param filmId to set of this Inventory * @return this Inventory instance */ Inventory setFilmId(int filmId); /** * Sets the storeId of this Inventory. The storeId field corresponds to the * database column db0.sakila.inventory.store_id. * * @param storeId to set of this Inventory * @return this Inventory instance */ Inventory setStoreId(short storeId); /** * Sets the lastUpdate of this Inventory. The lastUpdate field corresponds * to the database column db0.sakila.inventory.last_update. * * @param lastUpdate to set of this Inventory * @return this Inventory instance */ Inventory setLastUpdate(Timestamp lastUpdate); /** * Queries the specified manager for the referenced Film. If no such Film * exists, an {@code NullPointerException} will be thrown. * * @param foreignManager the manager to query for the entity * @return the foreign entity referenced */ Film findFilmId(Manager<Film> foreignManager); /** * Queries the specified manager for the referenced Store. If no such Store * exists, an {@code NullPointerException} will be thrown. * * @param foreignManager the manager to query for the entity * @return the foreign entity referenced */ Store findStoreId(Manager<Store> foreignManager); enum Identifier implements ColumnIdentifier<Inventory> { INVENTORY_ID ("inventory_id"), FILM_ID ("film_id"), STORE_ID ("store_id"), LAST_UPDATE ("last_update"); private final String columnName; private final TableIdentifier<Inventory> tableIdentifier; Identifier(String columnName) { this.columnName = columnName; this.tableIdentifier = TableIdentifier.of( getDbmsName(), getSchemaName(), getTableName()); } @Override public String getDbmsName() { return "db0"; } @Override public String getSchemaName() { return "sakila"; } @Override public String getTableName() { return "inventory"; } @Override public String getColumnName() { return this.columnName; } @Override public TableIdentifier<Inventory> asTableIdentifier() { return this.tableIdentifier; } } }