com.fenalco.entities
Class ShopKeeper

java.lang.Object
  extended by com.fenalco.entities.ShopKeeper

public class ShopKeeper
extends java.lang.Object

Esta clase representa a un minorista


Field Summary
private  int nurit
          Este campo indica si el minorista tiene un nurit 0: no 1:si
private  int shopKeeperId
          Identificador único del minorista
private  java.lang.String shopKeeperName
          Nombre del minorista (empresa)
 
Constructor Summary
ShopKeeper()
          Constructor por defecto de la clase
ShopKeeper(int shopKeeperId)
          Constructor que recibe el identificador de la empresa
 
Method Summary
 boolean changeSupplierState(java.lang.String supplierId, int newState)
          Cambia el estado de un proveedor para permitir o no que este se vea en el catálogo de productos que ve el minorista
 boolean delete(Transaction t)
           
 int getNurit()
          Consultor para el atributo nurit.
 int getShopKeeperId()
          Consultor para el atributo shopKeeperId.
 java.lang.String getShopKeeperName()
          Consultor para el atributo shopKeeperName.
 boolean loadData(int shopKeeperId)
          Consulta en la base de datos la tabla minorista por medio de la función query de la clase SqlUtilities para cargar los datos relacionados al minorista
static void main(java.lang.String[] args)
           
 boolean saveData(Transaction t)
           
 void setNurit(int nurit)
          Consultor para el atributo nurit.
 void setShopKeeperId(int shopKeeperId)
          Modificador para el atributo shopKeeperId.
 void setShopKeeperName(java.lang.String shopKeeperName)
          Modificador para el atributo shopKeeperName.
 boolean update(Transaction t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shopKeeperId

private int shopKeeperId
Identificador único del minorista


shopKeeperName

private java.lang.String shopKeeperName
Nombre del minorista (empresa)


nurit

private int nurit
Este campo indica si el minorista tiene un nurit 0: no 1:si

Constructor Detail

ShopKeeper

public ShopKeeper()
Constructor por defecto de la clase


ShopKeeper

public ShopKeeper(int shopKeeperId)
Constructor que recibe el identificador de la empresa

Parameters:
shopKeeperId - Identificador de la empresa
Method Detail

loadData

public boolean loadData(int shopKeeperId)
Consulta en la base de datos la tabla minorista por medio de la función query de la clase SqlUtilities para cargar los datos relacionados al minorista

Parameters:
shopKeeperId - Identificador del la empresa
Returns:
booleano que indica si la carga de los datos del minorista fué exitosa

changeSupplierState

public boolean changeSupplierState(java.lang.String supplierId,
                                   int newState)
Cambia el estado de un proveedor para permitir o no que este se vea en el catálogo de productos que ve el minorista

Parameters:
supplierId - Identificador del proveedor
newState - Nuevo estado (0,1)
Returns:
booleano que retorna si el cambio de estado fué exitoso

saveData

public boolean saveData(Transaction t)

update

public boolean update(Transaction t)

delete

public boolean delete(Transaction t)

getShopKeeperId

public int getShopKeeperId()
Consultor para el atributo shopKeeperId.

Returns:
Valor del atributo shopKeeperId.

setShopKeeperId

public void setShopKeeperId(int shopKeeperId)
Modificador para el atributo shopKeeperId.

Parameters:
shopKeeperId - Nuevo valor para el atributo shopKeeperId.

getShopKeeperName

public java.lang.String getShopKeeperName()
Consultor para el atributo shopKeeperName.

Returns:
Valor del atributo shopKeeperName.

setShopKeeperName

public void setShopKeeperName(java.lang.String shopKeeperName)
Modificador para el atributo shopKeeperName.

Parameters:
shopKeeperName - Nuevo valor para el atributo shopKeeperName.

getNurit

public int getNurit()
Consultor para el atributo nurit.

Returns:
Valor del atributo nurit.

setNurit

public void setNurit(int nurit)
Consultor para el atributo nurit.

Parameters:
nurit - Nuevo valor para el atributo nurit.

main

public static void main(java.lang.String[] args)