Class LogT

    • Field Detail

      • m_TableManager

        protected static TableManager<LogT> m_TableManager
        the table manager.
    • Constructor Detail

      • LogT

        protected LogT​(AbstractDatabaseConnection dbcon)
        The constructor.
        Parameters:
        dbcon - the database context this table is used in
    • Method Detail

      • load

        public LogEntry load​(long auto_id)
        Loads a log entry from db, using the database ID.
        Specified by:
        load in interface LogIntf
        Parameters:
        auto_id - the auto_id to retrieve and field from
        Returns:
        the log entry, null if not found
      • load

        public List<LogEntry> load​(LogEntryConditions cond)
        Loads log entries from the database that match the conditions.
        Specified by:
        load in interface LogIntf
        Parameters:
        cond - the conditions for the entries to match
        Returns:
        the log entries
      • resultsetToObject

        protected LogEntry resultsetToObject​(ResultSet rs)
        Turns the values at the next position into a substance object if possible.
        Parameters:
        rs - the result set
        Returns:
        the generate object or null in case of an error
      • exists

        public boolean exists​(LogEntry log)
        Looks for a log entry in the DB, looking for the auto_id.
        Specified by:
        exists in interface LogIntf
        Parameters:
        log - the log entry
        Returns:
        true if a log entry already exists
      • store

        protected boolean store​(LogEntry log,
                                boolean update)
        Inserts or updates a substance.
        Parameters:
        log - the log entry to store/update
        update - if true then an UPDATE will be performed, otherwise an INSERT
        Returns:
        true if insert successful or already present
      • add

        public boolean add​(LogEntry log)
        Adds a log entry.
        Specified by:
        add in interface LogIntf
        Parameters:
        log - the log entry to add
        Returns:
        true if insert successful or already present
      • update

        public boolean update​(LogEntry log)
        Updates a log entry.
        Specified by:
        update in interface LogIntf
        Parameters:
        log - the log entry to update
        Returns:
        true if update successful or false if not present
      • remove

        public boolean remove​(LogEntry log)
        Removes a log entry from the DB.
        Specified by:
        remove in interface LogIntf
        Parameters:
        log - the log entry
        Returns:
        true if successful