Skip to content

SEPARAR INTERFACES CLASE INVOICEDAO #14

@jarenPilco

Description

@jarenPilco

SEPARAR INTERFACES

public interface InvoiceRepository { Invoice findById(int id); List<Invoice> list(); boolean create(Invoice invoice); boolean update(Invoice invoice); boolean delete(Invoice invoice);
La cache podría ir en una clase decoradora o wrapper:
public class CachedInvoiceRepository implements InvoiceRepository { private final InvoiceRepository delegate; private final Map<Integer, Invoice> cache = new HashMap<>(); // métodos que usan cache y llaman al delegate }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions