Class MessageUpserter.Builder<M extends PMessage<M>>

    • Constructor Detail

      • Builder

        public Builder​(@Nonnull
                       PMessageDescriptor<M> descriptor,
                       @Nonnull
                       java.lang.String intoTable)
        Create a message inserter builder.
        Parameters:
        descriptor - The type descriptor.
        intoTable - The table name to insert info.
    • Method Detail

      • setAll

        public final MessageUpserter.Builder<M> setAll()
        Set all fields not already handled with default name and type.
        Returns:
        The builder.
      • setAllExcept

        @SafeVarargs
        public final MessageUpserter.Builder<M> setAllExcept​(PField<M>... except)
        Set all fields with defaults.
        Parameters:
        except - Fields to exclude.
        Returns:
        The builder.
      • setAllExcept

        public MessageUpserter.Builder<M> setAllExcept​(java.util.Collection<PField<M>> except)
        Set all fields with defaults.
        Parameters:
        except - Fields to exclude.
        Returns:
        The builder.
      • set

        @SafeVarargs
        public final MessageUpserter.Builder<M> set​(PField<M>... fields)
        Set the specific fields with default name and type.
        Parameters:
        fields - The fields to be set.
        Returns:
        The builder.
      • set

        public final MessageUpserter.Builder<M> set​(java.util.Collection<PField<M>> fields)
        Set the specific fields with default name and type.
        Parameters:
        fields - The fields to be set.
        Returns:
        The builder.
      • set

        public final MessageUpserter.Builder<M> set​(java.lang.String column,
                                                    PField<M> field)
        Set the specific field with name and default type.
        Parameters:
        column - The column name to set.
        field - The field to be set.
        Returns:
        The builder.
      • set

        public final MessageUpserter.Builder<M> set​(PField<M> field,
                                                    int type)
        Set the specific field with specific type and default name.
        Parameters:
        field - The field to be set.
        type - The field type to set as.
        Returns:
        The builder.
      • set

        public final MessageUpserter.Builder<M> set​(java.lang.String column,
                                                    PField<M> field,
                                                    int type)
        Set the specific field with specific name and type.
        Parameters:
        column - The column name to set.
        field - The field to be set.
        type - The field type to set as.
        Returns:
        The builder.
      • onDuplicateKeyUpdate

        @SafeVarargs
        public final MessageUpserter.Builder<M> onDuplicateKeyUpdate​(PField<M>... fields)
        On duplicate keys update the given fields.
        Parameters:
        fields - The fields to update.
        Returns:
        The builder.
      • onDuplicateKeyUpdate

        public final MessageUpserter.Builder<M> onDuplicateKeyUpdate​(java.util.Collection<PField<M>> fields)
        On duplicate keys update the given fields.
        Parameters:
        fields - The fields to update.
        Returns:
        The builder.
      • onDuplicateKeyUpdateAllExcept

        @SafeVarargs
        public final MessageUpserter.Builder<M> onDuplicateKeyUpdateAllExcept​(PField<M>... fields)
        On duplicate keys update all except the given fields.
        Parameters:
        fields - The fields to NOT update.
        Returns:
        The builder.
      • onDuplicateKeyUpdateAllExcept

        public final MessageUpserter.Builder<M> onDuplicateKeyUpdateAllExcept​(java.util.Collection<PField<M>> fields)
        On duplicate keys update all except the given fields.
        Parameters:
        fields - The fields to NOT update.
        Returns:
        The builder.
      • onDuplicateKeyUpdateAllExcept

        public final MessageUpserter.Builder<M> onDuplicateKeyUpdateAllExcept​(java.lang.String... exceptColumns)
        On duplicate keys update all except the given fields.
        Parameters:
        exceptColumns - The column names NOT to update.
        Returns:
        The builder.
      • onDuplicateKeyUpdate

        public final MessageUpserter.Builder<M> onDuplicateKeyUpdate​(java.lang.String... columns)
        On duplicate keys update the given columns.
        Parameters:
        columns - The column names NOT to update.
        Returns:
        The builder.
      • onDuplicateKeyIgnore

        public final MessageUpserter.Builder<M> onDuplicateKeyIgnore()
        On duplicate keys ignore updates.
        Returns:
        The builder.