Class TsvHdl

java.lang.Object
net.tangly.core.domain.TsvHdl

public final class TsvHdl extends Object
Utility class to handle TSV files.
  • Field Details

  • Method Details

    • exportDocuments

      public static void exportDocuments(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull Provider<Document> documents)
    • importDocuments

      public static void importDocuments(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull Provider<Document> documents)
    • isEmpty

      public static boolean isEmpty(@NotNull @NotNull org.apache.commons.csv.CSVRecord record)
    • nextNonEmptyRecord

      public static org.apache.commons.csv.CSVRecord nextNonEmptyRecord(Iterator<org.apache.commons.csv.CSVRecord> records)
    • of

      public static <T> net.tangly.gleam.model.TsvEntity<T> of(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull List<net.tangly.gleam.model.TsvProperty<T,?>> properties, @NotNull @NotNull Function<Long,T> supplier)
    • createTsvEntityFields

      public static <T extends MutableEntity> List<net.tangly.gleam.model.TsvProperty<T,?>> createTsvEntityFields()
    • parseString

      public static String parseString(@NotNull @NotNull org.apache.commons.csv.CSVRecord record, @NotNull @NotNull String fieldName)
    • parseDate

      public static LocalDate parseDate(@NotNull @NotNull org.apache.commons.csv.CSVRecord record, @NotNull @NotNull String fieldName)
    • parseInt

      public static int parseInt(@NotNull @NotNull org.apache.commons.csv.CSVRecord record, @NotNull @NotNull String fieldName)
    • parseBigDecimal

      public static BigDecimal parseBigDecimal(@NotNull @NotNull org.apache.commons.csv.CSVRecord record, @NotNull @NotNull String fieldName)
    • parseEnum

      public static <T extends Enum<T>> T parseEnum(@NotNull @NotNull org.apache.commons.csv.CSVRecord record, @NotNull @NotNull String fieldName, @NotNull @NotNull Class<T> enumType)
    • importEntities

      public static <T> void importEntities(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull net.tangly.gleam.model.TsvEntity<T> tsvEntity, @NotNull @NotNull Provider<T> provider)
    • importRelations

      public static <T> List<net.tangly.gleam.model.TsvRelation<T>> importRelations(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull net.tangly.gleam.model.TsvEntity<T> tsvEntity)
    • exportEntities

      public static <T> void exportEntities(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull net.tangly.gleam.model.TsvEntity<T> tsvEntity, @NotNull @NotNull Provider<T> provider)
    • exportRelations

      public static <T> void exportRelations(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull net.tangly.gleam.model.TsvEntity<T> tsvEntity, @NotNull @NotNull List<net.tangly.gleam.model.TsvRelation<T>> relations)
    • addComments

      public static <T extends HasMutableComments & HasOid> void addComments(Provider<T> provider, List<net.tangly.gleam.model.TsvRelation<Comment>> comments)
    • addComments

      public static <T extends HasMutableComments & HasOid> void addComments(Provider<T> provider, T entity, List<net.tangly.gleam.model.TsvRelation<Comment>> comments)
    • tagProperty

      public static <T extends HasMutableTags> net.tangly.gleam.model.TsvProperty<T,String> tagProperty(String tagName)
    • convertFoidTo

      public static <T extends HasOid> Function<T,Object> convertFoidTo()
    • toLocale

      public static Locale toLocale(String language)
    • exports

      public static <T, U> void exports(@NotNull @NotNull DomainAudit audit, @NotNull @NotNull Path path, @NotNull @NotNull net.tangly.gleam.model.TsvEntity<T> tsvEntity, @NotNull @NotNull List<U> items, @NotNull @NotNull BiConsumer<U,org.apache.commons.csv.CSVPrinter> lambda)